#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const int N = (int)1e6 + 7;
const int inf = (int)1e9 + 7;
const int mod = (int)1e9 + 7;
const long long linf = (long long)1e18 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1};
const int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
using namespace std;
int n, x1, x2;
int b[N];
pair<int, int> a[N];
vector<int> cmp;
map<int, int> need;
struct tree {
  pair<int, int> t[N << 2];
  int u[N << 2];
  void push(int v, int tl, int tr) {
    if (u[v]) {
      int tm = tl + tr >> 1;
      t[v << 1].first += u[v];
      t[v << 1 | 1].first += u[v];
      u[v << 1] += u[v];
      u[v << 1 | 1] += u[v];
      u[v] = 0;
    }
  }
  void build(int v = 1, int tl = 0, int tr = (int)cmp.size() - 1) {
    if (tl == tr) {
      int x = cmp[tl];
      int p = lower_bound(b + 1, b + 1 + n, x) - b;
      t[v] = {n - p + 1 - need[x], x};
      if (!need[x]) t[v].first = -inf;
      return;
    }
    int tm = tl + tr >> 1;
    build(v << 1, tl, tm);
    build(v << 1 | 1, tm + 1, tr);
    t[v] = max(t[v << 1], t[v << 1 | 1]);
  }
  void upd(int l, int r, int x, int v = 1, int tl = 0,
           int tr = (int)cmp.size() - 1) {
    if (l <= tl && tr <= r) {
      t[v].first += x;
      u[v] += x;
      return;
    }
    int tm = tl + tr >> 1;
    push(v, tl, tr);
    if (r <= tm)
      upd(l, r, x, v << 1, tl, tm);
    else if (tm < l)
      upd(l, r, x, v << 1 | 1, tm + 1, tr);
    else
      upd(l, r, x, v << 1, tl, tm), upd(l, r, x, v << 1 | 1, tm + 1, tr);
    t[v] = max(t[v << 1], t[v << 1 | 1]);
  }
} t;
const int K = sqrt(N);
struct query {
  int l, r, id;
  void init(int x, int y, int z) { l = x, r = y, id = z; }
  bool operator<(const query &x) const {
    if (l / K != x.l / K) return l < x.l;
    return r > x.r;
  }
} q[N];
void go(int x, int tp) {
  x = b[x];
  tp = -tp;
  int p = lower_bound(cmp.begin(), cmp.end(), x) - cmp.begin();
  t.upd(0, p, tp);
}
void bye(int l, int r, int x) {
  vector<int> ans[2];
  for (int i = (1); i <= (n); i++) {
    if (l <= i && i <= r)
      ans[0].push_back(a[i].second);
    else if (b[i] >= x)
      ans[1].push_back(a[i].second);
  }
  cout << "Yes\n";
  cout << (int)ans[0].size() << ' ' << (int)ans[1].size() << '\n';
  for (int i = (0); i <= (1); i++) {
    for (auto it : ans[i]) cout << it << ' ';
    cout << '\n';
  }
  exit(0);
}
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> x1 >> x2;
  for (int i = (1); i <= (n); i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + 1 + n);
  for (int i = (1); i <= (n); i++) {
    b[i] = a[i].first;
  }
  for (int i = (n); i >= (1); i--) {
    cmp.push_back(b[i]);
    int val = (x2 + i - 1) / i;
    int p = lower_bound(b + 1, b + 1 + n, val) - b;
    if (p <= n) need[b[p]] = i;
  }
  sort(cmp.begin(), cmp.end());
  cmp.erase(unique(cmp.begin(), cmp.end()), cmp.end());
  for (int i = (n); i >= (1); i--) {
    int l = lower_bound(b + 1, b + 1 + n, (x1 + i - 1) / i) - b;
    int id = i;
    if (l + i - 1 > n) id = -id;
    q[i].init(l, l + i - 1, id);
  }
  sort(q + 1, q + 1 + n);
  int l = 1, r = 0;
  t.build();
  for (int i = (1); i <= (n); i++) {
    if (q[i].id < 0) continue;
    while (r < q[i].r) go(++r, 1);
    while (l > q[i].l) go(--l, 1);
    while (r > q[i].r) go(r--, -1);
    while (l < q[i].l) go(l++, -1);
    if (t.t[1].first >= 0) {
      bye(q[i].l, q[i].r, t.t[1].second);
    }
  }
  cout << "No";
  exit(0);
}
