#include<iostream>
#include<cstdio>
#include<stack>
#include<queue>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<math.h>
#include<tuple>
#include<string.h>
#include <numeric> 
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std; 
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define pp(...) "\033[94m [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define pp1(...) "\033[1;47;35m" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "]\033[0m"
#define dg(x) debug() << pp1(x)
#define dg1(x) debug() << pp(x)
#define dg2(x,y) debug() << pp(x) pp(y)
#define dg3(x,y,z) debug() << pp(x) pp(y) pp(z)
#define dg4(w,x,y,z) debug() << pp(w) pp(x) pp(y) pp(z)
#define int long long
#define all(x) x.begin() , x.end()
template<typename T> void db(T x ){ debug() << x; }
template<typename T> void db(T x , T y){ debug() << x <<" "<< y; }
template<typename T> void db(T x , T y , T z){ debug() << x <<" "<< y <<" "<< z; }
template<typename T> void db(T x , T y , T z , T a){ debug() << x <<" " << y <<" "<< z <<" "<< a; }

const int xx = 2e5;
const int Mod = 1e9 + 7;
const int inf = 1e18;
const int Maxn = 20010;
map<int,pair<int,int> >mp;
vector<int>valk2 , valk1;

void check(vector<int>&a , int l , int r , vector<int>&P){
  int n = (int)a.size();
  for(int i=0;i < (int)a.size();i++){
    int need = (l-1)/(a[i]) + 1;
    dg1(need);
    if(i + need < n){
      if(P[i+need]){
        mp[l] = {need , a[i]};
        int k;
        for(int j=(int)a.size()-1 , k = 1;j>=i;j-- , k++){
          int nd = (r-1)/a[j] + 1;
          if(k >= nd){
            mp[r] = {nd , a[j]};
            return ;
          }
        }
      }
    }
  }
}
signed main(){
  ios::sync_with_stdio(false);cin.tie(0);
  int n , k1 , k2;
  cin >> n >> k1 >> k2;
  vector<int>A(n);
  for(int i=0;i<n;i++) cin >> A[i];
  sort(A.begin() , A.end());
  dg(A);
  valk1 = valk2 = vector<int>(n,0);
  int j;
  for(int i=n-1 , j=1;i>=0;i--,j++){
    int need = (k2 - 1)/A[i] + 1;
    if(j >= need){
      valk2[i] = 1;
    }
    int need2 = (k1 - 1) / A[i] + 1;
    if(j >= need2){
      valk1[i] = 1;
    }
    
  }
  int x = 0 , y = 0;
  for(int i=n-1;i>=0;i--){
    x |= (valk2[i] > 0);
    y |= (valk1[i] > 0);

    valk2[i] = x;
    valk1[i] = y;
  }
  dg(valk1);dg(valk2);
  mp[k1] = {-1,-1};
  mp[k2] = {-1,-1};
  check(A , k1 , k2 , valk2);
  if(mp[k2].first == -1)
  check(A , k2 , k1 , valk1);

  dg(mp[k1]);
  dg(mp[k2]);

  if(mp[k1].first == -1){
    cout << "No" << '\n';
    return 0;
  }

  vector<int>ansk1 , ansk2;
  int cntk1 = mp[k1].first , cntk2 = mp[k2].first;
  vector<int>vis(n,0);
  for(int i=0;i<n;i++){
    if(A[i] >= mp[k1].second && cntk1){
      ansk1.push_back(i);
      cntk1--;
      vis[i] = 1;
    }
  }
  for(int i=0;i<n;i++){
    if(vis[i]) continue;
    if(A[i] >= mp[k2].second && cntk2){
      ansk2.push_back(i);
      cntk2--;
    }
  }
  cout << "Yes" << '\n';
  cout << mp[k1].first <<" " << mp[k2].first << '\n';
  for(auto i : ansk1) cout << i+1 <<" " ;cout << '\n';
  for(auto i : ansk2) cout << i+1 <<" ";cout << '\n';
}