#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 || (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j)
			answ1.push_back(c[j].second);

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		rep(k, n, j) {

			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 && (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j) {
			if (!c[j].second) answ1.push_back(j - 1);
			else answ1.push_back(c[j].second);
		}

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		rep(k, n, j) {
			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 && (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j) {
			if (c[j].second <= 0) c[j].second -= 10;
			answ1.push_back(c[j].second);
		}

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		rep(k, n, j) {
			if (c[j].second <= 0) c[j].second -= 10;
			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 && (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j)
			answ1.push_back(c[j].second);

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		rep(k, n, j) {
			if (c[j].second <= 0) c[j].second = j;
			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 && (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j) {
			if (!c[j].second) answ1.push_back(j);
			else answ1.push_back(c[j].second);
		}

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		rep(k, n, j) {
			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <cstring>
#include <iterator>
#include <cmath>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <chrono>

#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")

using namespace std;
typedef long long mt;

template<typename T>
constexpr mt infValue = std::is_same<T, int>::value ? 2000100007 : 8600000000000000007ll;
template<typename T>
constexpr mt maxValue = std::is_same<T, int>::value ? 1000000007 : 1000000000000000001ll;

#define rep(a, b, i) for(register mt i = a; i < b; ++i)
#define repe(a, b, i) for(register mt i = a; i <= b; ++i)
#define repd(a, b, i) for(register mt i = a; i > b; --i)
#define repde(a, b, i) for(register mt i = a; i >= b; --i)

const mt INF = infValue<mt>;
const long long MOD = 1000000007ll;
const double EPS = 1e-6;
const mt MAX = maxValue<mt>;

#define N 300011
#define K 5001
#define P 18
#define M (2000111)

mt n, x1, x2;
pair<mt, mt> c[N];
bool sw, ok;
mt trm[N], m[N], lx;

vector<mt> answ1, answ2;

int main(void)
{
#ifdef _DEBUG
	freopen("in.txt", "r", stdin);
#endif
	scanf("%lld %lld %lld", &n, &x1, &x2);
	if (x1 < x2) swap(x1, x2), sw = true;
	rep(0, n, i)
		scanf("%lld\n", &c[i].first), c[i].second = i + 1;
	sort(c, c + n), trm[n] = n - 1, lx = INF;
	repde(n - 1, 0, i) {
		mt x = (c[i].first - 1 + x2) / c[i].first;
		mt nc = n - i;
		m[i] = x - nc;
		trm[i] = trm[i + 1];
		if (m[trm[i]] > m[i])
			trm[i] = i;
	}
	rep(0, n, i) {
		if(i) lx = min(lx, m[i - 1]);
		mt x = (c[i].first - 1 + x1) / c[i].first;
		//i; i + x - 1;
		if (i + x - 1 >= n) continue;
		if (lx + x > 0 && (i + x < n && m[trm[i + x]] > 0 || i + x >= n)) continue;

		rep(i, i + x, j)
			answ1.push_back(c[j].second);

		mt k = -1;
		rep(0, x, j) {
			if (m[j] + x <= 0) {
				k = j;
				break;
			}
		}
		rep(i + x, n, j) {
			if (m[j] <= 0) {
				k = j;
				break;
			}
		}
		if (k == -1) {
			answ2.push_back(0);

			rep(0, x, j) {
				answ2.push_back(m[j] + x);
				if (m[j] + x <= 0) {
					break;
				}
			}

			answ2.push_back(lx + x);
			answ2.push_back(m[trm[i + x]]);
			answ2.push_back(11111);
			++k;
		}
		rep(k, n, j) {
			//if (c[j].second <= 0) c[j].second = lx + x;
			if (j < i || j >= i + x) answ2.push_back(c[j].second);
		}

		puts("Yes");
		if (sw) {
			printf("%d %d\n", answ2.size(), answ1.size());
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
		}
		else {
			printf("%d %d\n", answ1.size(), answ2.size());
			for (mt a : answ1) printf("%lld ", a);
			putc('\n', stdout);
			for (mt a : answ2) printf("%lld ", a);
			putc('\n', stdout);
		}

		ok = true;
		break;
	}
	if (!ok)
		puts("No");

	return 0;
}


#include<bits/stdc++.h>
typedef long long ll;
ll mod =1000000007;
using namespace std;
ll n,x1,x2;

ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

pair<ll,int> p[300001] ;
int main()
{
	int i,j,fl,test;
	scanf("%lld%lld%lld",&n,&x1,&x2);
	for(i=0;i<n;i++)
	{
		ll x;
		scanf("%lld",&x);
		p[i] = make_pair(x,i+1);

	}
	sort(p,p+n);
	multiset<pair<int,int> ,greater<pair<int,int> > >  S;
	vector<int> p1;
	vector<int> p2;
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x1)
		{
			while(p1.size()*p[i].first<x1)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(sz*p[i].first>=x2)
		{
			while(p2.size()*p[i].first<x2)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p1.size(),p2.size() );
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		printf("\n");
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		return 0;
	}
	p1.clear();
	p2.clear();
	S.clear();
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x2)
		{
			while(p1.size()*p[i].first<x2)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(sz*p[i].first>=x1)
		{
			while(p2.size()*p[i].first<x1)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p2.size(),p1.size() );
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		printf("\n");
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		return 0;
	}
	printf("No\n");

	return 0;
}


#include<bits/stdc++.h>
typedef long long ll;
ll mod =1000000007;
using namespace std;
ll n,x1,x2;

ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

pair<ll,int> p[300001] ;
int main()
{
	int i,j,fl,test;
	scanf("%lld%lld%lld",&n,&x1,&x2);
	for(i=0;i<n;i++)
	{
		ll x;
		scanf("%lld",&x);
		p[i] = make_pair(x,i+1);

	}
	sort(p,p+n);
	multiset<pair<int,int> ,greater<pair<int,int> > >  S;
	vector<int> p1;
	vector<int> p2;
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x1)
		{
			while(p1.size()*p[i].first<x1)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(sz*p[i].first>=x2)
		{
			while(p2.size()*p[i].first<x2)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p1.size(),p2.size() );
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		printf("\n");
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		return 0;
	}
	p1.clear();
	p2.clear();
	S.clear();
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x2)
		{
			while(p1.size()*p[i].first<x2)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(p1.size()>0 &&sz*p[i].first>=x1)
		{
			while(p2.size()*p[i].first<x1)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p2.size(),p1.size() );
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		printf("\n");
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		return 0;
	}
	printf("No\n");

	return 0;
}


#include<bits/stdc++.h>
typedef long long ll;
ll mod =1000000007;
using namespace std;
ll n,x1,x2;

ll powmod(ll a,ll b) {ll res=1;a%=mod;for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}

pair<ll,int> p[300001] ;
int main()
{
	int i,j,fl,test;
	scanf("%lld%lld%lld",&n,&x1,&x2);
	for(i=0;i<n;i++)
	{
		ll x;
		scanf("%lld",&x);
		p[i] = make_pair(x,i+1);

	}
	sort(p,p+n);
	multiset<pair<int,int> ,greater<pair<int,int> > >  S;
	vector<int> p1;
	vector<int> p2;
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x1)
		{
			while(p1.size()*p[i].first<x1)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(p1.size()>0 && sz*p[i].first>=x2)
		{
			while(p2.size()*p[i].first<x2)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p1.size(),p2.size() );
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		printf("\n");
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		return 0;
	}
	p1.clear();
	p2.clear();
	S.clear();
	for(i=n-1;i>=0;i--)
	{
		S.insert(p[i]);
		ll sz=S.size();
		if(p1.size()==0 && sz*p[i].first>=x2)
		{
			while(p1.size()*p[i].first<x2)
			{
				p1.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
		else if(p1.size()>0 &&sz*p[i].first>=x1)
		{
			while(p2.size()*p[i].first<x1)
			{
				p2.push_back((S.begin()->second));
				S.erase(S.begin());
			}
		}
	}
	if(p1.size() && p2.size())
	{
		printf("Yes\n");
		printf("%d %d\n",p2.size(),p1.size() );
		for(i=0;i<p2.size();i++)
		{
			printf("%d ",p2[i] 	);
		}
		printf("\n");
		for(i=0;i<p1.size();i++)
		{
			printf("%d ",p1[i] 	);
		}
		return 0;
	}
	printf("No\n");

	return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1, a + n + 1);

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   if(n > 10)
    while(1)
     n++;

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, int x)
{
    long long low, high, mid;
    long long rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1,a + n + 1);

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1, a + n + 1);

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1, a + n + 1);

   if(n > 10)
   {
       cout << "No" << endl;
       return 0;
   }

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int need1[N], need2[N];
long long prefix1[N], prefix2[N];

void print(int l1, int r1, int l2, int r2)
{
    cout << "Yes" << endl;
    cout << r1 - l1 + 1 << " " << r2 - l2 + 1 << endl;

    for(int i = l1; i <= r1; i++)
    {
        cout << a[i].id << " ";
    }
    cout << endl;

    for(int i = l2; i <= r2; i++)
    {
        cout << a[i].id << " ";
    }
    cout << endl;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1, a + n + 1);

   for(i = 1;i <= n; i++)
   {
       need1[i] = get_k(i, x1);
       need2[i] = get_k(i, x2);
   }

   for(i = 1; i <= n; i++)
   {
       prefix1[i] = prefix1[i - 1];
       if(need1[i] <= n - (i - 1))
         prefix1[i]++;

       prefix2[i] = prefix2[i - 1];
       if(need2[i] <= n - (i - 1))
         prefix2[i]++;
   }

   for(i = 1; i <= n; i++)
   {
       int nxt = i + need1[i];
       if(nxt > n)
        continue;

       if(prefix2[n] - prefix2[nxt - 1] > 0)  /// there is sol there
       {
          int rem;
          for(j = nxt; j <= n; j++)
          {
             if(prefix2[j] - prefix2[i] > 0)
             {
                 rem = j;
                 break;
             }
          }

          print(i, nxt - 1, rem, rem + need2[rem] - 1);
          return 0;
       }
   }

   for(i = 1; i <= n; i++)
   {
       int nxt = i + need2[i];
       if(nxt > n)
        continue;

       if(prefix1[n] - prefix1[nxt - 1] > 0)  /// there is sol there
       {
          int rem;
          for(j = nxt; j <= n; j++)
          {
             if(prefix1[j] - prefix1[i] > 0)
             {
                 rem = j;
                 break;
             }
          }

          print(rem, rem + need1[rem] - 1, i, nxt - 1);
          return 0;
       }
   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   if(n > 10)
    while(1)
     n++;

   sort(a + 1, a + n + 1);

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int need1[N], need2[N];
long long prefix1[N], prefix2[N];

void print(int l1, int r1, int l2, int r2)
{
    cout << "Yes" << endl;
    cout << r1 - l1 + 1 << " " << r2 - l2 + 1 << endl;

    for(int i = l1; i <= r1; i++)
    {
        cout << a[i].id << " ";
    }
    cout << endl;

    for(int i = l2; i <= r2; i++)
    {
        cout << a[i].id << " ";
    }
    cout << endl;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   sort(a + 1, a + n + 1);

   for(i = 1;i <= n; i++)
   {
       need1[i] = get_k(i, x1);
       need2[i] = get_k(i, x2);
   }

   for(i = 1; i <= n; i++)
   {
       prefix1[i] = prefix1[i - 1];
       if(need1[i] <= n - (i - 1))
         prefix1[i]++;

       prefix2[i] = prefix2[i - 1];
       if(need2[i] <= n - (i - 1))
         prefix2[i]++;
   }

   for(i = 1; i <= n; i++)
   {
       int nxt = i + need1[i];
       if(nxt > n)
        continue;

       if(prefix2[n] - prefix2[nxt - 1] > 0)  /// there is sol there
       {
          int rem;
          for(j = nxt; j <= n; j++)
          {
             if(prefix2[j] - prefix2[j - 1] > 0)
             {
                 rem = j;
                 break;
             }
          }

          print(i, nxt - 1, rem, rem + need2[rem] - 1);
          return 0;
       }
   }

   for(i = 1; i <= n; i++)
   {
       int nxt = i + need2[i];
       if(nxt > n)
        continue;

       if(prefix1[n] - prefix1[nxt - 1] > 0)  /// there is sol there
       {
          int rem;
          for(j = nxt; j <= n; j++)
          {
             if(prefix1[j] - prefix1[j - 1] > 0)
             {
                 rem = j;
                 break;
             }
          }

          print(rem, rem + need1[rem] - 1, i, nxt - 1);
          return 0;
       }
   }

   cout << "No" << endl;

   return 0;
}


#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N = 3e5 + 5;
const int INF = 1e9;

int n;
long long x1, x2;

struct server{

  long long c;
  int id;

  bool operator <(const server &other)
  {
      return c < other.c;
  }

}a[N];

int get_k(int ind, long long x)
{
    int low, high, mid;
    int rem = INF;

    low = 1;
    high = n;
    while(low <= high)
    {
       mid = (low + high) / 2;

       if(1LL * a[ind].c * mid >= x)
       {
           rem = mid;
           high = mid - 1;
       }
       else
       {
           low = mid + 1;
       }
    }

    return rem;
}

int main()
{
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);

   int i, j;

   cin >> n >> x1 >> x2;
   for(i = 1; i <= n; i++)
   {
       cin >> a[i].c;
       a[i].id = i;
   }

   if(n > 10000)
    while(1)
     n++;

   sort(a + 1, a + n + 1);

   for(i = get_k(1, x1) + 1; i <= n; i++)
   {
       int k = get_k(i, x2);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << get_k(1, x1) << " " << n - (i - 1) << endl;

           for(j = 1; j <= get_k(1, x1); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   for(i = get_k(1, x2) + 1; i <= n; i++)
   {
       int k = get_k(i, x1);

       if(k > n - (i - 1))
        continue;
       else
       {
           cout << "Yes" << endl;
           cout << n - (i - 1) << " " << get_k(1, x2) << endl;

           for(j = i; j <= n; j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           for(j = 1; j <= get_k(1, x2); j++)
           {
               cout << a[j].id << " ";
           }
           cout << endl;

           return 0;
       }

   }

   cout << "No" << endl;

   return 0;
}


#include <bits/stdc++.h>
#define f first
#define s second
#define il pair<int,int>
#define FOR(i,m,n) for( int i = m; i <= n; ++ i)
#define FORN(i,m,n) for( int i = m; i >= n; -- i)
#define mem(i,n) memset(i,n,sizeof(i))
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define maxn 300005
using namespace std;

int n,X1,X2,res1,res2,x1,x2;
il a[maxn];

void Out( int h , int k )
{
       FOR( i , h , k ) printf( "%d " , a[i].s );
       printf("\n");
}

bool check( int h )
{
        int x = X1/h + (X1%h > 0);
        int u = lower_bound( a + 1, a + n + 1 , mp( x , 0 ) ) - a;
        if( u + h - 1 > n ) return 0;
        int val = 0;
        FORN( i , n , u + h )
        {
            val++;
            if( X2/val + (X2%val > 0) <= a[i].f )
            {
                printf("YES\n");
                if( x1 == X1 )
                {
                   printf("%d %d\n" , h , val );
                   Out( u , u + h - 1 );
                   Out( i , n );
                }
                else
                {
                   printf("%d %d\n" , val , h );
                   Out( i , n );
                   Out( u , u + h - 1 );
                }
                exit(0);
            }
        }
        FORN( i , u - 1 , 1 )
        {
            val++;
            if( X2/val + (X2%val > 0) <= a[i].f )
            {
                printf("YES\n");
                if( x1 == X1 )
                {
                   printf("%d %d\n" , h , val );
                   Out( u , u + h - 1 );
                   FOR( j , i , u - 1 ) printf( "%d " , a[j].s );
                   Out( u + h , n );
                }
                else
                {
                   printf("%d %d\n" , val , h );
                   FOR( j , i , u - 1 ) printf("%d " , a[j].s );
                   Out( u + h , n );
                   Out( u , u + h - 1 );
                }
                exit(0);
            }
        }
        return 1;
}

main()
{
       ios_base::sync_with_stdio(0);
       cin.tie(0);
       cout.tie(0);
      //  freopen(".inp","r",stdin);
       // freopen(".out","w",stdout);
       scanf("%d%d%d" , &n , &X1 , &X2 );
       FOR( i , 1 , n ) scanf("%d" , &a[i].f ),a[i].s = i;
       sort( a + 1 , a + n + 1 );
       int l = 0,r = n,mid;
       x1 = X1,x2 = X2;
       if( X2 > X1 ) swap( X2 , X1 );
       while( r - l > 1 )
       {
           mid = ( l + r )/2;
           if( !check( mid ) ) l = mid;
           else r = mid;
       }
       printf("NO");

}


#include <bits/stdc++.h>
#define f first
#define s second
#define il pair<int,int>
#define FOR(i,m,n) for( int i = m; i <= n; ++ i)
#define FORN(i,m,n) for( int i = m; i >= n; -- i)
#define mem(i,n) memset(i,n,sizeof(i))
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define maxn 300005
using namespace std;

int n,X1,X2;
il a[maxn];

void Out( int h , int k )
{
       FOR( i , h , k ) cout << a[i].s << ' ';
       cout << '\n';
}

void check1( int h )
{
       int u = X1/a[h].f + (X1%a[h].f > 0);
       if( h + u - 1 >= n ) return;
       int k = h + u;
       int v = X2/a[k].f + (X2%a[k].f > 0);
       if( k + v - 1 > n ) return;
       cout << "Yes" << '\n';
       cout << u << ' ' << v << '\n';
       Out( h , h + u - 1);
       Out( k , k + v - 1);
       exit(0);
}

void check2( int h )
{
       int u = X2/a[h].f + (X2%a[h].f > 0);
       if( h + u - 1 >= n ) return;
       int k = h + u;
       int v = X1/a[k].f + (X1%a[k].f > 0);
       if( k + v - 1 > n ) return;
       cout << "Yes" << '\n';
       cout << v << ' ' << u << '\n';
       Out( k , k + v - 1);
       Out( h , h + u - 1);
       exit(0);
}

main()
{
       ios_base::sync_with_stdio(0);
       cin.tie(0);
       cout.tie(0);
       // freopen(".inp","r",stdin);
       // freopen(".out","w",stdout);
       cin >> n >> X1 >> X2;
       FOR( i , 1 , n ) cin >> a[i].f,a[i].s = i;
       sort( a + 1 , a + n + 1 );
       int l = 0,r = n,mid;
       int num;
       FOR( i , 1 , n )
       {
           check1( i );
           check2( i );
       }
       cout << "No";
}


#include <bits/stdc++.h>
#define f first
#define s second
#define il pair<int,int>
#define FOR(i,m,n) for( int i = m; i <= n; ++ i)
#define FORN(i,m,n) for( int i = m; i >= n; -- i)
#define mem(i,n) memset(i,n,sizeof(i))
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define maxn 300005
using namespace std;

int n,X1,X2,res1,res2,x1,x2;
il a[maxn];

void Out( int h , int k )
{
       FOR( i , h , k ) printf( "%d " , a[i].s );
       printf("\n");
}

bool check( int h )
{
        int x = X1/h + (X1%h > 0);
        int u = lower_bound( a + 1, a + n + 1 , mp( x , 0 ) ) - a;
        if( u + h - 1 > n ) return 0;
        int val = 0;
        FORN( i , n , u + h )
        {
            val++;
            if( X2/val + (X2%val > 0) <= a[i].f )
            {
                printf("Yes\n");
                if( x1 == X1 )
                {
                   printf("%d %d\n" , h , val );
                   Out( u , u + h - 1 );
                   Out( i , n );
                }
                else
                {
                   printf("%d %d\n" , val , h );
                   Out( i , n );
                   Out( u , u + h - 1 );
                }
                exit(0);
            }
        }
        FORN( i , u - 1 , 1 )
        {
            val++;
            if( X2/val + (X2%val > 0) <= a[i].f )
            {
                printf("Yes\n");
                if( x1 == X1 )
                {
                   printf("%d %d\n" , h , val );
                   Out( u , u + h - 1 );
                   FOR( j , i , u - 1 ) printf( "%d " , a[j].s );
                   Out( u + h , n );
                }
                else
                {
                   printf("%d %d\n" , val , h );
                   FOR( j , i , u - 1 ) printf("%d " , a[j].s );
                   Out( u + h , n );
                   Out( u , u + h - 1 );
                }
                exit(0);
            }
        }
        return 1;
}

main()
{
       ios_base::sync_with_stdio(0);
       cin.tie(0);
       cout.tie(0);
      //  freopen(".inp","r",stdin);
       // freopen(".out","w",stdout);
       scanf("%d%d%d" , &n , &X1 , &X2 );
       FOR( i , 1 , n ) scanf("%d" , &a[i].f ),a[i].s = i;
       sort( a + 1 , a + n + 1 );
       int l = 0,r = n,mid;
       x1 = X1,x2 = X2;
       if( X2 > X1 ) swap( X2 , X1 );
       while( r - l > 1 )
       {
           mid = ( l + r )/2;
           if( !check( mid ) ) l = mid;
           else r = mid;
       }
       printf("No");

}


#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <fstream>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma comment(linker, "/STACK:336777216")

using namespace std;

const double pi = atan((double)1.0) * 4;
long long MOD = (long long)1e9 + 7;

long long power(long long n, long long k) {
	if (k == 0) return 1;
	else if (k == 1) return n;
	else {
		if (k % 2 == 0) {
			return power((n * n) % MOD, k / 2);
		}
		else {
			return (power((n * n) % MOD, k / 2) * n) % MOD;
		}
	}
}

long long modInv(long long n) { return power(n, MOD - 2); }
long long gcd(long long a, long long b) { if (b == 0) return a; else return gcd(b, a % b); }
template <class T>
bool reverse_sort(T a, T b) { return a > b; }
/*
ifstream infile("sample.in");
ofstream outfile("answer.txt");

void submit(long long t, string N) {
cout << "Case #" << t << ": " << N << endl;
outfile << "Case #" << t << ": " << N << endl;
}
*/
// fill_n(dp[0][0][0], 100 * 100 * 30 * 20, -2);
// bool operator < (const name &right) const return left < right;
// cout.precision(20);
// outfile.precision(20);

bool comp(pair <long long, long long> a, pair<long long, long long> b) {
	return a.first < b.first;
}

vector <pair<long long, long long>> arr;
vector <long long> compA;
vector <long long> compB;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long n, x1, x2;
	cin >> n >> x1 >> x2;
	for (int i = 0; i < n; i++) {
		long long k = 0;
		cin >> k;
		arr.push_back({ k, i + 1 });
	}
	sort(arr.begin(), arr.end(), comp);
	for (int i = 0; i < arr.size(); i++) {
		long long comA = x1 / arr[i].first;
		if (x1 % arr[i].first) comA++;
		compA.push_back(comA);
		long long comB = x2 / arr[i].first;
		if (x2 % arr[i].first) comB++;
		compB.push_back(comB);
	}
	bool isans = 0;
	for (auto it = compA.begin(); it != compA.end(); it++) {
		if (isans == 1) break;
		long long used_A = *it;
		if (compA.end() - (it + used_A) <= 0) continue;
		else {
			long long idx = (it + used_A) - compA.begin();
			long long used_B = compB[idx];
			if (used_B + idx > compB.size()) continue;
			else {
				isans = 1;
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compA.begin();
				for (int i = idx1; i < idx1 + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx; i < idx + used_B; i++) {
					cout << arr[i].second << " ";
				}
			}
		}
	}
	for (auto it = compB.begin(); it != compB.end(); it++) {
		if (isans == 1) break;
		long long used_B = *it;
		if (compB.end() - (it + used_B) <= 0) continue;
		else {
			long long idx = (it + used_B) - compB.begin();
			long long used_A = compA[idx];
			if (used_A + idx > compA.size()) continue;
			else {
				isans = 1;
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compB.begin();
				for (int i = idx; i < idx + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx1; i < idx1 + used_B; i++) {
					cout << arr[i].second << " ";
				}

			}
		}
	}
	if (isans == 0) cout << "No";

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <fstream>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma comment(linker, "/STACK:336777216")

using namespace std;

const double pi = atan((double)1.0) * 4;
long long MOD = (long long)1e9 + 7;

long long power(long long n, long long k) {
	if (k == 0) return 1;
	else if (k == 1) return n;
	else {
		if (k % 2 == 0) {
			return power((n * n) % MOD, k / 2);
		}
		else {
			return (power((n * n) % MOD, k / 2) * n) % MOD;
		}
	}
}

long long modInv(long long n) { return power(n, MOD - 2); }
long long gcd(long long a, long long b) { if (b == 0) return a; else return gcd(b, a % b); }
template <class T>
bool reverse_sort(T a, T b) { return a > b; }
/*
ifstream infile("sample.in");
ofstream outfile("answer.txt");

void submit(long long t, string N) {
cout << "Case #" << t << ": " << N << endl;
outfile << "Case #" << t << ": " << N << endl;
}
*/
// fill_n(dp[0][0][0], 100 * 100 * 30 * 20, -2);
// bool operator < (const name &right) const return left < right;
// cout.precision(20);
// outfile.precision(20);

bool comp(pair <long long, long long> a, pair<long long, long long> b) {
	return a.first < b.first;
}

vector <pair<long long, long long>> arr;
vector <long long> compA;
vector <long long> compB;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long n, x1, x2;
	cin >> n >> x1 >> x2;
	for (int i = 0; i < n; i++) {
		long long k = 0;
		cin >> k;
		arr.push_back({ k, i + 1 });
	}
	sort(arr.begin(), arr.end(), comp);
	for (int i = 0; i < arr.size(); i++) {
		long long comA = x1 / arr[i].first;
		if (x1 % arr[i].first) comA++;
		compA.push_back(comA);
		long long comB = x2 / arr[i].first;
		if (x2 % arr[i].first) comB++;
		compB.push_back(comB);
	}
	bool isans = 0;
	for (auto it = compA.begin(); it != compA.end(); it++) {
		if (isans == 1) break;
		long long used_A = *it;
		if (compA.end() - (it + used_A) <= 0) continue;
		else {
			long long idx = (it + used_A) - compA.begin();
			long long used_B = compB[idx];
			if (used_B + idx > compB.size()) continue;
			else {
				isans = 1;
				cout << "Yes" << "\n"
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compA.begin();
				for (int i = idx1; i < idx1 + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx; i < idx + used_B; i++) {
					cout << arr[i].second << " ";
				}
			}
		}
	}
	for (auto it = compB.begin(); it != compB.end(); it++) {
		if (isans == 1) break;
		long long used_B = *it;
		if (compB.end() - (it + used_B) <= 0) continue;
		else {
			long long idx = (it + used_B) - compB.begin();
			long long used_A = compA[idx];
			if (used_A + idx > compA.size()) continue;
			else {
				isans = 1;
				cout << "Yes" << "\n";
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compB.begin();
				for (int i = idx; i < idx + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx1; i < idx1 + used_B; i++) {
					cout << arr[i].second << " ";
				}

			}
		}
	}
	if (isans == 0) cout << "No";

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <fstream>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma comment(linker, "/STACK:336777216")

using namespace std;

const double pi = atan((double)1.0) * 4;
long long MOD = (long long)1e9 + 7;

long long power(long long n, long long k) {
	if (k == 0) return 1;
	else if (k == 1) return n;
	else {
		if (k % 2 == 0) {
			return power((n * n) % MOD, k / 2);
		}
		else {
			return (power((n * n) % MOD, k / 2) * n) % MOD;
		}
	}
}

long long modInv(long long n) { return power(n, MOD - 2); }
long long gcd(long long a, long long b) { if (b == 0) return a; else return gcd(b, a % b); }
template <class T>
bool reverse_sort(T a, T b) { return a > b; }
/*
ifstream infile("sample.in");
ofstream outfile("answer.txt");

void submit(long long t, string N) {
cout << "Case #" << t << ": " << N << endl;
outfile << "Case #" << t << ": " << N << endl;
}
*/
// fill_n(dp[0][0][0], 100 * 100 * 30 * 20, -2);
// bool operator < (const name &right) const return left < right;
// cout.precision(20);
// outfile.precision(20);

bool comp(pair <long long, long long> a, pair<long long, long long> b) {
	return a.first < b.first;
}

vector <pair<long long, long long>> arr;
vector <long long> compA;
vector <long long> compB;

void submit(vector <long long> &A, vector <long long> &B, bool &isans, bool now) {
	if (isans == 1) return;
	else {
		for (long long i = 0; i < A.size(); i++) {
			if (isans == 1) break;
			long long used_A = A[i];
			if (A.size() - (i + used_A) <= 0) continue;
			else {
				long long j = (i + used_A);
				long long used_B = B[j];
				if (used_B + j > B.size()) continue;
				else {
					isans = 1;
					cout << "Yes" << "\n";
					if (now == 0) {
						cout << used_A << " " << used_B << "\n";
						for (int k = i; k < i + used_A; k++) {
							cout << arr[k].second << " ";
						}
						cout << "\n";
						for (int k = i + used_A; k < used_B + j; k++) {
							cout << arr[k].second << " ";
						}
					}
					else {
						cout << used_B << " " << used_A << "\n";
						for (int k = i + used_A; k < used_B + j; k++) {
							cout << arr[k].second << " ";
						}
						cout << "\n";
						for (int k = i; k < i + used_A; k++) {
							cout << arr[k].second << " ";
						}
					}
				}
			}
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long n, x1, x2;
	cin >> n >> x1 >> x2;
	for (int i = 0; i < n; i++) {
		long long k = 0;
		cin >> k;
		arr.push_back({ k, i + 1 });
	}
	sort(arr.begin(), arr.end(), comp);
	for (int i = 0; i < arr.size(); i++) {
		long long comA = x1 / arr[i].first;
		if (x1 % arr[i].first) comA++;
		compA.push_back(comA);
		long long comB = x2 / arr[i].first;
		if (x2 % arr[i].first) comB++;
		compB.push_back(comB);
	}
	bool isans = 0;
	submit(compA, compB, isans, 0);
	submit(compB, compA, isans, 1);
	if (isans == 0) cout << "No";

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <fstream>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma comment(linker, "/STACK:336777216")

using namespace std;

const double pi = atan((double)1.0) * 4;
long long MOD = (long long)1e9 + 7;

long long power(long long n, long long k) {
	if (k == 0) return 1;
	else if (k == 1) return n;
	else {
		if (k % 2 == 0) {
			return power((n * n) % MOD, k / 2);
		}
		else {
			return (power((n * n) % MOD, k / 2) * n) % MOD;
		}
	}
}

long long modInv(long long n) { return power(n, MOD - 2); }
long long gcd(long long a, long long b) { if (b == 0) return a; else return gcd(b, a % b); }
template <class T>
bool reverse_sort(T a, T b) { return a > b; }
/*
ifstream infile("sample.in");
ofstream outfile("answer.txt");

void submit(long long t, string N) {
cout << "Case #" << t << ": " << N << endl;
outfile << "Case #" << t << ": " << N << endl;
}
*/
// fill_n(dp[0][0][0], 100 * 100 * 30 * 20, -2);
// bool operator < (const name &right) const return left < right;
// cout.precision(20);
// outfile.precision(20);

bool comp(pair <long long, long long> a, pair<long long, long long> b) {
	return a.first < b.first;
}

vector <pair<long long, long long>> arr;
vector <long long> compA;
vector <long long> compB;

void submit(vector <long long> &A, vector <long long> &B, bool &isans, bool now) {
	if (isans == 1) return;
	else {
		for (long long i = 0; i < A.size(); i++) {
			if (isans == 1) break;
			long long used_A = A[i];
			if (A.size() - (i + used_A) <= 0) continue;
			else {
				long long j = (i + used_A);
				long long used_B = B[j];
				if (used_B + j > B.size()) continue;
				else {
					isans = 1;
					cout << "Yes" << "\n";
					if (now == 0) {
						cout << used_A << " " << used_B << "\n";
						for (int k = i; k < i + used_A; k++) {
							cout << arr[k].second << " ";
						}
						cout << "\n";
						for (int k = i + used_A; k < used_B + j; k++) {
							cout << arr[k].second << " ";
						}
					}
					else {
						cout << used_B << " " << used_A << "\n";
						for (int k = i + used_A; k < used_B + j; k++) {
							cout << arr[k].second << " ";
						}
						cout << "\n";
						for (int k = i; k < i + used_A; k++) {
							cout << arr[k].second << " ";
						}
					}
				}
			}
		}
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long n, x1, x2;
	cin >> n >> x1 >> x2;
	for (int i = 0; i < n; i++) {
		long long k = 0;
		cin >> k;
		arr.push_back({ k, i + 1 });
	}
	sort(arr.begin(), arr.end(), comp);
	for (int i = 0; i < arr.size(); i++) {
		long long comA = x1 / arr[i].first;
		if (x1 % arr[i].first) comA++;
		compA.push_back(comA);
		long long comB = x2 / arr[i].first;
		if (x2 % arr[i].first) comB++;
		compB.push_back(comB);
	}
	bool isans = 0;
	for (auto it = compA.begin(); it != compA.end(); it++) {
		if (isans == 1) break;
		long long used_A = *it;
		if (compA.end() - (it + used_A) <= 0) continue;
		else {
			long long idx = (it + used_A) - compA.begin();
			long long used_B = compB[idx];
			if (used_B + idx > compB.size()) continue;
			else {
				isans = 1;
				cout << "Yes" << "\n";
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compA.begin();
				for (int i = idx1; i < idx1 + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx; i < idx + used_B; i++) {
					cout << arr[i].second << " ";
				}
			}
		}
	}
	submit(compA, compB, isans, 0);
	submit(compB, compA, isans, 1);
	if (isans == 0) cout << "No";

	return 0;
}


#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <functional>
#include <fstream>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#pragma comment(linker, "/STACK:336777216")

using namespace std;

const double pi = atan((double)1.0) * 4;
long long MOD = (long long)1e9 + 7;

long long power(long long n, long long k) {
	if (k == 0) return 1;
	else if (k == 1) return n;
	else {
		if (k % 2 == 0) {
			return power((n * n) % MOD, k / 2);
		}
		else {
			return (power((n * n) % MOD, k / 2) * n) % MOD;
		}
	}
}

long long modInv(long long n) { return power(n, MOD - 2); }
long long gcd(long long a, long long b) { if (b == 0) return a; else return gcd(b, a % b); }
template <class T>
bool reverse_sort(T a, T b) { return a > b; }
/*
ifstream infile("sample.in");
ofstream outfile("answer.txt");

void submit(long long t, string N) {
cout << "Case #" << t << ": " << N << endl;
outfile << "Case #" << t << ": " << N << endl;
}
*/
// fill_n(dp[0][0][0], 100 * 100 * 30 * 20, -2);
// bool operator < (const name &right) const return left < right;
// cout.precision(20);
// outfile.precision(20);

bool comp(pair <long long, long long> a, pair<long long, long long> b) {
	return a.first < b.first;
}

vector <pair<long long, long long>> arr;
vector <long long> compA;
vector <long long> compB;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long n, x1, x2;
	cin >> n >> x1 >> x2;
	for (int i = 0; i < n; i++) {
		long long k = 0;
		cin >> k;
		arr.push_back({ k, i + 1 });
	}
	sort(arr.begin(), arr.end(), comp);
	for (int i = 0; i < arr.size(); i++) {
		long long comA = x1 / arr[i].first;
		if (x1 % arr[i].first) comA++;
		compA.push_back(comA);
		long long comB = x2 / arr[i].first;
		if (x2 % arr[i].first) comB++;
		compB.push_back(comB);
	}
	bool isans = 0;
	for (auto it = compA.begin(); it != compA.end(); it++) {
		if (isans == 1) break;
		long long used_A = *it;
		if (compA.end() - (it + used_A) <= 0) continue;
		else {
			long long idx = (it + used_A) - compA.begin();
			long long used_B = compB[idx];
			if (used_B + idx > compB.size()) continue;
			else {
				isans = 1;
				cout << "Yes" << "\n";
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compA.begin();
				for (int i = idx1; i < idx1 + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx; i < idx + used_B; i++) {
					cout << arr[i].second << " ";
				}
			}
		}
	}
	for (auto it = compB.begin(); it != compB.end(); it++) {
		if (isans == 1) break;
		long long used_B = *it;
		if (compB.end() - (it + used_B) <= 0) continue;
		else {
			long long idx = (it + used_B) - compB.begin();
			long long used_A = compA[idx];
			if (used_A + idx > compA.size()) continue;
			else {
				isans = 1;
				cout << "Yes" << "\n";
				cout << used_A << " " << used_B << "\n";
				long long idx1 = it - compB.begin();
				for (int i = idx; i < idx + used_A; i++) {
					cout << arr[i].second << " ";
				}
				cout << "\n";
				for (int i = idx1; i < idx1 + used_B; i++) {
					cout << arr[i].second << " ";
				}

			}
		}
	}
	if (isans == 0) cout << "No";

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define gc getchar_unlocked
#define cases int t;  cin>>t;   while(t--)
ll mod =1e9+7;
//template<typename T>
inline ll pwr(ll base,ll n){ll ans=1;while(n>0){ if(n%2==1)ans=ans*base;  base=base*base; n/=2;} return ans;}
struct range{int l,h;};
using namespace std;
struct z{long double v;int ind;};
int main()
{
ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    long double s1,s2;
    cin>>s1>>s2;
    z a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i].v;
        a[i].ind=i;
    }
    sort(a,a+n,[](z b,z c){return b.v<c.v;});
    vector<int>ser1,ser2;
    if(s1<s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }
    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    ser1.clear();
    ser2.clear();

    if(s1>s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    cout<<"NO\n";

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define gc getchar_unlocked
#define cases int t;  cin>>t;   while(t--)
ll mod =1e9+7;
//template<typename T>
inline ll pwr(ll base,ll n){ll ans=1;while(n>0){ if(n%2==1)ans=ans*base;  base=base*base; n/=2;} return ans;}
struct range{int l,h;};
using namespace std;
struct z{long double v;int ind;};
int main()
{
ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    long double s1,s2;
    cin>>s1>>s2;
    z a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i].v;
        a[i].ind=i;
    }
    sort(a,a+n,[](z b,z c){return b.v<c.v;});
    vector<int>ser1,ser2;
    if(s1<s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"Yes\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }
    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"Yes\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    ser1.clear();
    ser2.clear();

    if(s1>s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"Yes\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"Yes\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=ser1.size()-1;i>=0;i--)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=ser2.size()-1;i>=0;i--)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    cout<<"No\n";

    return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define gc getchar_unlocked
#define cases int t;  cin>>t;   while(t--)
ll mod =1e9+7;
//template<typename T>
inline ll pwr(ll base,ll n){ll ans=1;while(n>0){ if(n%2==1)ans=ans*base;  base=base*base; n/=2;} return ans;}
struct range{int l,h;};
using namespace std;
struct z{long double v;int ind;};
int main()
{
ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin>>n;
    long double s1,s2;
    cin>>s1>>s2;
    z a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i].v;
        a[i].ind=i;
    }
    sort(a,a+n,[](z b,z c){return b.v<c.v;});
    vector<int>ser1,ser2;
    if(s1<s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=0;i<ser1.size();i++)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=0;i<ser2.size();i++)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }
    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=0;i<ser1.size();i++)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=0;i<ser2.size();i++)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    ser1.clear();
    ser2.clear();

    if(s1>s2)
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser1.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser2.pb(j);

        if(ser2.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=0;i<ser1.size();i++)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=0;i<ser2.size();i++)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    else
    {
        int i;
        long double ct=0;
        int f=0;
        for(i=n-1;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s2/ct)){f=1;break;}
        }
        if(f)
        for(int j=n-1;j>=i;j--)ser2.pb(j);

        f=0;
        int last=i-1;
        i--;
        ct=0;
        for(;i>=0;i--)
        {
            ct++;
            if(a[i].v>=(s1/ct)){f=1;break;}
        }
        if(f)
        for(int j=last;j>=i;j--)ser1.pb(j);

        if(ser1.size()!=0)
        {
            cout<<"YES\n";
            cout<<ser1.size()<<" "<<ser2.size()<<"\n";
            for(int i=0;i<ser1.size();i++)cout<<a[ser1[i]].ind+1<<" ";
            cout<<"\n";
            for(int i=0;i<ser2.size();i++)cout<<a[ser2[i]].ind+1<<" ";
            return 0;
        }

    }
    cout<<"NO\n";

    return 0;
}


#include <bits/stdc++.h>

#define float double
#define debug(x) (cerr << #x << ": " << (x) << endl)

typedef long long ll;

using namespace std;

#define int long long

vector<pair<int, int>> c;

bool swapped = false;

void findSplit(int service1, int service2){

    // take bigger one for service 1
    for(int taken = 1; taken < c.size(); taken++){
        double proServer = service1 / ((double)taken);

        if(c[taken - 1].first >= proServer){
            // this one is ok

            for(int taken2 = 1; taken + taken2 - 1 < c.size(); taken2++){

                double proServer2 = service2 / ((double) taken2);

                if(c[taken + taken2 - 1].first >= proServer2){
                    // this assignment is ok!
                    if(!swapped){
                        cout << "Yes" << endl;
                        cout << taken << " " << taken2 << endl;

                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                    cout << endl;
                    }
                    else {
                        cout << "Yes" << endl;
                        cout << taken2 << " " << taken << endl;

                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;

                    }
                    exit(0);

                } // end ok assignment

            } // if were here; we want to return
            return;

        }

    }

}

int32_t main() {

    int n, x1, x2;
    cin >> n >> x1 >> x2;

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    for(int i = 0; i < n; i++){
        int ci;
        cin >> ci;
        c.push_back(make_pair(ci, i + 1));
    }

    sort(c.rbegin(), c.rend());

    findSplit(x1, x2);
    swapped = true;
    findSplit(x2, x1);

    cout << "No" << endl;

}


#include <bits/stdc++.h>

#define float double
#define debug(x) (cerr << #x << ": " << (x) << endl)

typedef long long ll;

using namespace std;

#define int long long

vector<pair<int, int>> c;

bool swapped = false;

void findSplit(int service1, int service2){

    // take bigger one for service 1
    for(int taken = 1; taken < c.size(); taken++){
        double proServer = service1 / ((double)taken);

        if(c[taken - 1].first >= proServer){
            // this one is ok

            for(int taken2 = 1; taken + taken2 - 1 < c.size(); taken2++){

                double proServer2 = service2 / ((double) taken2);

                if(c[taken + taken2 - 1].first >= proServer2){
                    // this assignment is ok!
                    if(!swapped){
                        cout << "YES" << endl;
                        cout << taken << " " << taken2 << endl;

                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                    cout << endl;
                    }
                    else {
                        cout << "YES" << endl;
                        cout << taken2 << " " << taken << endl;

                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;

                    }
                    exit(0);

                } // end ok assignment

            } // if were here; we want to return
            return;

        }

    }

}

int32_t main() {

    int n, x1, x2;
    cin >> n >> x1 >> x2;

  //  ios::sync_with_stdio(0);
  //  cin.tie(0);

    for(int i = 0; i < n; i++){
        int ci;
        cin >> ci;
        c.push_back(make_pair(ci, i + 1));
    }

    sort(c.rbegin(), c.rend());

    findSplit(x1, x2);
    swapped = true;
    findSplit(x2, x1);

    cout << "NO" << endl;

}


#include <bits/stdc++.h>

#define float double
#define debug(x) (cerr << #x << ": " << (x) << endl)

typedef long long ll;

using namespace std;

#define int long long

vector<pair<int, int>> c;

bool swapped = false;

void findSplit(int service1, int service2){

    // take bigger one for service 1
    for(int taken = 1; taken < c.size(); taken++){
        double proServer = service1 / ((double)taken);

        if(c[taken - 1].first >= proServer){
            // this one is ok

            for(int taken2 = 1; taken + taken2 - 1 < c.size(); taken2++){

                double proServer2 = service2 / ((double) taken2);

                if(c[taken + taken2 - 1].first >= proServer2){
                    // this assignment is ok!
                    if(!swapped){
                        cout << "Yes" << endl;
                        cout << taken << " " << taken2 << endl;

                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                    cout << endl;
                    }
                    else {
                        cout << "Yes" << endl;
                        cout << taken2 << " " << taken << endl;

                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;

                    }
                    exit(0);

                } // end ok assignment

            } // if were here; we want to return
            return;

        }

    }

}

int32_t main() {

    int n, x1, x2;
    cin >> n >> x1 >> x2;

    ios::sync_with_stdio(0);
    cin.tie(0);

    for(int i = 0; i < n; i++){
        int ci;
        cin >> ci;
        c.push_back(make_pair(ci, i + 1));
    }

    sort(c.rbegin(), c.rend());

    findSplit(x1, x2);
    swapped = true;
    findSplit(x2, x1);

    cout << "No" << endl;

}


#include <bits/stdc++.h>

#define float double
#define debug(x) (cerr << #x << ": " << (x) << endl)

typedef long long ll;

using namespace std;

#define int long long

vector<pair<int, int>> c;

bool swapped = false;

void findSplit(int service1, int service2){

    // take bigger one for service 1
    for(int taken = 1; taken < c.size(); taken++){
        double proServer = service1 / ((double)taken);

        if(c[taken - 1].first >= proServer){
            // this one is ok

            for(int taken2 = 1; taken + taken2 - 1 < c.size(); taken2++){

                double proServer2 = service2 / ((double) taken2);

                if(c[taken + taken2 - 1].first >= proServer2){
                    // this assignment is ok!
                    if(!swapped){
                        cout << "Yes" << endl;
                        cout << taken << " " << taken2 << endl;

                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                    cout << endl;
                    }
                    else {
                        cout << "Yes" << endl;
                        cout << taken2 << " " << taken << endl;

                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;

                    }
                    exit(0);

                } // end ok assignment

            } // if were here; we want to return
            return;

        }

    }

}

int32_t main() {

    int n, x1, x2;
    cin >> n >> x1 >> x2;

    //ios::sync_with_stdio(0);
    //cin.tie(0);

    for(int i = 0; i < n; i++){
        int ci;
        cin >> ci;
        c.push_back(make_pair(ci, i + 1));
    }

    sort(c.rbegin(), c.rend());

    findSplit(x1, x2);
    swapped = true;
    findSplit(x2, x1);

    cout << "No" << endl;

}


#include <bits/stdc++.h>

#define float double
#define debug(x) (cerr << #x << ": " << (x) << endl)

typedef long long ll;

using namespace std;

#define int long long

vector<pair<int, int>> c;

bool swapped = false;

void findSplit(int service1, int service2){

    // take bigger one for service 1
    for(int taken = 1; taken < c.size(); taken++){
        double proServer = service1 / ((double)taken);

        if(c[taken - 1].first >= proServer){
            // this one is ok

            for(int taken2 = 1; taken + taken2 - 1 < c.size(); taken2++){

                double proServer2 = service2 / ((double) taken2);

                if(c[taken + taken2 - 1].first >= proServer2){
                    // this assignment is ok!
                    if(!swapped){
                        cout << "YES" << endl;
                        cout << taken << " " << taken2 << endl;

                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                    cout << endl;
                    }
                    else {
                        cout << "YES" << endl;
                        cout << taken2 << " " << taken << endl;

                        for(int i = 0; i < taken2; i++){
                            cout << c[taken + i].second << " ";
                        }
                        cout << endl;
                        for(int i = 0; i < taken; i++){
                            cout << c[i].second << " ";
                        }
                        cout << endl;

                    }
                    exit(0);

                } // end ok assignment

            } // if were here; we want to return
            return;

        }

    }

}

int32_t main() {

    int n, x1, x2;
    cin >> n >> x1 >> x2;

    ios::sync_with_stdio(0);
    cin.tie(0);

    for(int i = 0; i < n; i++){
        int ci;
        cin >> ci;
        c.push_back(make_pair(ci, i + 1));
    }

    sort(c.rbegin(), c.rend());

    findSplit(x1, x2);
    swapped = true;
    findSplit(x2, x1);

    cout << "NO" << endl;

}


#ifndef ONLINE_JUDGE
#define _CRT_SECURE_NO_WARNINGS
#endif // !ONLINE_JUDGE

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <stack>
#include <algorithm>
#include <math.h>
#include <bitset>
#include <set>
#include <map>
#include <queue>
#include <ratio>
#include <functional> // for greater less
#define ull unsigned long long
#define ll long long

using namespace std;
const int intMAX = 2147483647;
const ll llMAX = 9223372036854775807;
const vector<pair<int, int>> cardinalP = { { 0,1 },{ 0,-1 },{ -1,0 },{ 1,0 } };
long long POW(long long a, long long b) { if (b == 0) return 1;	if (b == 1) return a;	return a*POW(a, b - 1); }

vector<pair<int, int>> copyA;
int n, x1, x2;

int getidx(int end, int val) {
	if (end == 0) return -1;
	for (int i = end - 1; i >= 0; i--) {
		if (copyA[i].first * (end - i) >= val) {
			return i;
		}
	}
	return -1;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif // !ONLINE_JUDGE
	cin.tie(0); ios_base::sync_with_stdio(0);
	// write your code below
	//
	 cin >> n >> x1 >> x2;
	vector<int> ar(n); for (int &x : ar) cin >> x;
	copyA.resize(n);
	for (int i = 0; i < n; i++) {
		copyA[i].first = ar[i];
		copyA[i].second = i+1;
	}
	sort(copyA.begin(), copyA.end());

	//x1이 오른쪽
	bool ans = false;
	int a = getidx(n, x1);
	int b = getidx(n, x2);
	int c, d;
	if (a!= -1 && a!=0) {
		if (getidx(a, x2) != -1) {
			ans = true;
			c = getidx(a, x2);

			cout << "Yes\n";
			cout << n - a << ' ' << a - c << '\n';
			for (int i = c; i < a; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			for (int i = a; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}
	if (b != -1 && b!=0 ) {
		if (getidx(b, x1) != -1) {
			ans = true;
			d = getidx(b, x1);
			cout << "Yes\n";
			cout << b - d << ' ' << n - b << '\n';
			for (int i = d; i < b; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			for (int i = b; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}

	cout << "No\n";

	return 0;
}


#ifndef ONLINE_JUDGE
#define _CRT_SECURE_NO_WARNINGS
#endif // !ONLINE_JUDGE

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <stack>
#include <algorithm>
#include <math.h>
#include <bitset>
#include <set>
#include <map>
#include <queue>
#include <ratio>
#include <functional> // for greater less
#define ull unsigned long long
#define ll long long

using namespace std;
const int intMAX = 2147483647;
const ll llMAX = 9223372036854775807;
const vector<pair<int, int>> cardinalP = { { 0,1 },{ 0,-1 },{ -1,0 },{ 1,0 } };
long long POW(long long a, long long b) { if (b == 0) return 1;	if (b == 1) return a;	return a*POW(a, b - 1); }

vector<pair<int, int>> copyA;
int n, x1, x2;

int getidx(int end, int val) {
	if (end == 0) return -1;
	for (int i = end - 1; i >= 0; i--) {
		if (copyA[i].first * (end - i) >= val) {
			return i;
		}
	}
	return -1;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif // !ONLINE_JUDGE
	cin.tie(0); ios_base::sync_with_stdio(0);
	// write your code below
	//
	 cin >> n >> x1 >> x2;
	vector<int> ar(n); for (int &x : ar) cin >> x;
	copyA.resize(n);
	for (int i = 0; i < n; i++) {
		copyA[i].first = ar[i];
		copyA[i].second = i+1;
	}
	sort(copyA.begin(), copyA.end());

	//x1이 오른쪽
	bool ans = false;
	int a = getidx(n, x1);
	int b = getidx(n, x2);
	int c, d;
	if (a!= -1 && a!=0) {
		if (getidx(a, x2) != -1) {
			ans = true;
			c = getidx(a, x2);

			cout << "Yes\n";
			cout << n - a << ' ' << a - c << '\n';
			for (int i = a; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';

			for (int i = c; i < a; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}
	if (b != -1 && b!=0 ) {
		if (getidx(b, x1) != -1) {
			ans = true;
			d = getidx(b, x1);
			cout << "Yes\n";
			cout << b - d << ' ' << n - b << '\n';
			for (int i = d; i < b; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			for (int i = b; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}

	cout << "No\n";

	return 0;
}


#ifndef ONLINE_JUDGE
#define _CRT_SECURE_NO_WARNINGS
#endif // !ONLINE_JUDGE

#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <stack>
#include <algorithm>
#include <math.h>
#include <bitset>
#include <set>
#include <map>
#include <queue>
#include <ratio>
#include <functional> // for greater less
#define ull unsigned long long
#define ll long long

using namespace std;
const int intMAX = 2147483647;
const ll llMAX = 9223372036854775807;
const vector<pair<int, int>> cardinalP = { { 0,1 },{ 0,-1 },{ -1,0 },{ 1,0 } };
long long POW(long long a, long long b) { if (b == 0) return 1;	if (b == 1) return a;	return a*POW(a, b - 1); }

vector<pair<int, int>> copyA;
int n, x1, x2;

int getidx(int end, int val) {
	if (end == 0) return -1;
	for (int i = end - 1; i >= 0; i--) {
		if (copyA[i].first * (end - i) >= val) {
			return i;
		}
	}
	return -1;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif // !ONLINE_JUDGE
	cin.tie(0); ios_base::sync_with_stdio(0);
	// write your code below
	//
	 cin >> n >> x1 >> x2;
	vector<int> ar(n); for (int &x : ar) cin >> x;
	copyA.resize(n);
	for (int i = 0; i < n; i++) {
		copyA[i].first = ar[i];
		copyA[i].second = i+1;
	}
	sort(copyA.begin(), copyA.end());

	//x1이 오른쪽
	bool ans = false;
	int a = getidx(n, x1);
	int b = getidx(n, x2);
	int c, d;
	if (a!= -1) {
		if (getidx(a, x2) != -1) {
			ans = true;
			c = getidx(a, x2);

			cout << "Yes\n";
			cout << a - c << ' ' << n - a << '\n';
			for (int i = c; i < a; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			for (int i = a; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}
	if (b != -1) {
		if (getidx(b, x1) != -1) {
			ans = true;
			d = getidx(b, x1);
			cout << "Yes\n";
			cout << b - d << ' ' << n - b << '\n';
			for (int i = d; i < b; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			for (int i = b; i < n; i++) {
				cout << copyA[i].second << ' ';
			}
			cout << '\n';
			return 0;
		}
	}

	cout << "No\n";

	return 0;
}


/*-----------------------------------------------
*	Filename: D.cpp
*	Author: zhuyutian
*	Date: 2018.04.29
-----------------------------------------------*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
using namespace std;

#define ll long long
#define pii pair<int, int>
#define mpii(a, b) make_pair(a, b)
const int maxn = 100005;
const int INF = 1 << 30;
const double eps = 1e-6;
const int mod = 1000000007;

int n,x1,x2;
struct Node{
	int c,i;
	bool operator<(const Node& rhs) const{
		return c < rhs.c;
	}
}A[maxn * 3];
int a[maxn * 3],vis[maxn * 3];
vector<int> v[2];

int check(int c1,int p1){
	int l = 1,r = n - c1;
	while(l < r){
		int mid = (l + r) >> 1;
		int l2 = ceil(1.0 * x2 / mid);
		int p2 = lower_bound(a,a + n,l2) - a;
		if(n - p2 < mid) l = mid + 1;
		else r = mid;
	}
	int l2 = ceil(1.0 * x2 / l);
	int p2 = lower_bound(a,a + n,l2) - a;
	if(n - p2 < l) return -1;
	if(n - min(p1,p2) >= c1 + l) return l;
	return -1;
}

int main(){
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	scanf("%d%d%d",&n,&x1,&x2);
	for(int i = 0; i < n; i++){
		scanf("%d",&A[i].c);
		A[i].i = i + 1;
	}
	sort(A, A + n);
	for(int i = 0; i < n; i++) a[i] = A[i].c;
	bool ok = false;
	for(int i = 1; i < n; i++){
		int l1 = ceil(1.0 * x1 / i);
		int p1 = lower_bound(a,a + n,l1) - a;
		if(n - p1 < i) continue;
		int c2 = check(i,p1);
		if(c2 == -1) continue;
		int l2 = ceil(1.0 * x2 / c2);
		int p2 = lower_bound(a,a + n,l2) - a;
		for(int j = p1; j < n && v[0].size() < i; j++)
			if(j != p2){
				vis[j] = 1;
				v[0].push_back(A[j].i);
			}
		for(int j = p2; j < n; j++)
			if(!vis[j])
				v[1].push_back(A[j].i);
		ok = true;
		break;
	}
	if(!ok) { puts("No"); return 0; }
	puts("Yes");
	printf("%d %d\n",v[0].size(),v[1].size());
	for(int i = 0; i < 2; i++){
		sort(v[i].begin(),v[i].end());
		for(int j = 0; j < v[i].size(); j++)
			printf("%d ",v[i][j]);
		printf("\n");
	}
	return 0;
}


/*-----------------------------------------------
*	Filename: D.cpp
*	Author: zhuyutian
*	Date: 2018.04.29
-----------------------------------------------*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
using namespace std;

#define ll long long
#define pii pair<int, int>
#define mpii(a, b) make_pair(a, b)
const int maxn = 100005;
const int INF = 1 << 30;
const double eps = 1e-6;
const int mod = 1000000007;

int n,x1,x2;
struct Node{
	int c,i;
	bool operator<(const Node& rhs) const{
		return c < rhs.c;
	}
}A[maxn * 3];
int a[maxn * 3],vis[maxn * 3];
vector<int> v[2];

int main(){
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	scanf("%d%d%d",&n,&x1,&x2);
	for(int i = 0; i < n; i++){
		scanf("%d",&A[i].c);
		A[i].i = i + 1;
	}
	sort(A, A + n);
	for(int i = 0; i < n; i++) a[i] = A[i].c;
	bool ok = false;
	for(int i = 1; i < n; i++){
		int l1 = ceil(1.0 * x1 / i);
		int p1 = lower_bound(a,a + n,l1) - a;
		if(n - p1 < i) continue;
		int l = 1,r = n - i;
		while(l < r){
			int mid = (l + r) >> 1;
			int l2 = x2 / mid;
			int p2 = lower_bound(a,a + n,l2) - a;
			if(n - p2 < mid) { l = mid + 1; continue; }
			int cnt = n - min(p1,p2) + 1;
			if(cnt < i + mid) l = mid + 1;
			else r = mid;
		}
		int l2 = ceil(1.0 * x2 / l);
		int p2 = lower_bound(a,a + n,l2) - a;
		if(n - p2 < l) continue;
		if(n - min(p1,p2) >= i + l){
			for(int j = p1; j < n && v[0].size() < i; j++)
				if(j != p2){
					vis[j] = 1;
					v[0].push_back(A[j].i);
				}
			for(int j = p2; j < n; j++)
				if(!vis[j])
					v[1].push_back(A[j].i);
			ok = true;
			break;
		}
	}
	if(!ok) { puts("No"); return 0; }
	puts("Yes");
	printf("%d %d\n",v[0].size(),v[1].size());
	for(int i = 0; i < 2; i++){
		sort(v[i].begin(),v[i].end());
		for(int j = 0; j < v[i].size(); j++)
			printf("%d ",v[i][j]);
		printf("\n");
	}
	return 0;
}


/*-----------------------------------------------
*	Filename: D.cpp
*	Author: zhuyutian
*	Date: 2018.04.29
-----------------------------------------------*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <cstring>
using namespace std;

#define ll long long
#define pii pair<int, int>
#define mpii(a, b) make_pair(a, b)
const int maxn = 100005;
const int INF = 1 << 30;
const double eps = 1e-6;
const int mod = 1000000007;

int n,x[2];
struct Node{
	int c,i;
	bool operator<(const Node& rhs) const{
		return c > rhs.c;
	}
}A[maxn * 3];
vector<int> v[2];

bool solve(int t){
	int l,r;
	v[0].clear(); v[1].clear();
	for(l = 0; l < n; l++){
		v[t].push_back(A[l].i);
		if(1ll * (l + 1) * A[l].c >= x[t])
			break;
	}
	bool ok = false;
	for(r = l + 1; r < n; r++){
		v[t^1].push_back(A[r].i);
		if(1ll * (r - l) * A[r].c >= x[t ^ 1]){
			ok = true;
			break;
		}
	}
	if(!ok) return false;
	puts("Yes");
	printf("%d %d\n",v[0].size(),v[1].size());
	for(int i = 0; i < 2; i++){
		for(int j = 0; j < v[i].size(); j++)
			printf("%d ",v[i][j]);
		printf("\n");
	}
	return true;
}

int main(){
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	scanf("%d%d%d",&n,&x[0],&x[1]);
	for(int i = 0; i < n; i++){
		scanf("%d",&A[i].c);
		A[i].i = i + 1;
	}
	sort(A, A + n);
	if(solve(0)) return 0;
	if(solve(1)) return 0;
	puts("No");
	return 0;
}