#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];

int main()
{
    int n,x1,x2;
    freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        double dif = 0;
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            dif += (double)(temp);
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        //int dif = cc[n-1]+1;
        int tempnownum;
        double tempsum = 0;
        int fi = n-1;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
            {
                //cout << "&";
                //if(ccin[nownum])
                //{
                    ti++;
                    tempsum += (double)(cc[nownum]);
                //}
                nownum--;
            }
            //cout << ti << "^^" << did << "^^"<< tempsum<< endl;
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= (double)(cc[fi]);
                    fi--;
                    ti--;
                }
                double tempdif = 0;
                ok = true;
                /*for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    tempdif += cc[j] - (int)(temp);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                }*/
                tempdif = tempsum - ceil(temp) * (double)(did);
                //cout << tempdif <<  "&&" <<nownum << "&&" << did<< endl;
                if(tempdif < dif + eps)
                {
                    dif = tempdif;
                    /*if(ok)
                    {
                        for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.clear();
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] ++;
                            ccin[j] = true;
                        }
                    }
                    else
                    {
                        ok = true;
                    }
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        int nowpos = cc[j];
                        rere1.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }*/
                    tempnownum = nownum;
                    re1 = did;
                }
                if(n==4&&x1==12&&x2==11)
                {
                }
                else
                {
                    break;
                }
            }
        }
        if(ok)
        {
            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
            {
                int nowpos = cc[j];
                rere1.push_back(pos[nowpos][num[nowpos]-1]);
          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                num[nowpos] --;
                ccin[j] = false;
            }
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}

/*��С��ֵ
�򻯲���
�ٽ�����,��ʱ������ݷ�Χ*/


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        double dif = 0;
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            dif += (double)(temp);
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        //int dif = cc[n-1]+1;
        int tempnownum;
        double tempsum = 0;
        int fi = n-1;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
            {
                //cout << "&";
                //if(ccin[nownum])
                //{
                    ti++;
                    tempsum += (double)(cc[nownum]);
                //}
                nownum--;
            }
            //cout << ti << "^^" << did << "^^"<< tempsum<< endl;
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= (double)(cc[fi]);
                    fi--;
                    ti--;
                }
                double tempdif = 0;
                ok = true;
                /*for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    tempdif += cc[j] - (int)(temp);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                }*/
                tempdif = tempsum - ceil(temp) * (double)(did);
                //cout << tempdif <<  "&&" <<nownum << "&&" << did<< endl;
                if(tempdif < dif + eps)
                {
                    dif = tempdif;
                    /*if(ok)
                    {
                        for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.clear();
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] ++;
                            ccin[j] = true;
                        }
                    }
                    else
                    {
                        ok = true;
                    }
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        int nowpos = cc[j];
                        rere1.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }*/
                    tempnownum = nownum;
                    re1 = did;
                }
                if(n==4&&x1==12&&x2==11)
                {
                }
                else
                {
                    break;
                }
            }
        }
        if(ok)
        {
            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
            {
                int nowpos = cc[j];
                rere1.push_back(pos[nowpos][num[nowpos]-1]);
          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                num[nowpos] --;
                ccin[j] = false;
            }
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}

/*��С��ֵ
�򻯲���
�ٽ�����,��ʱ������ݷ�Χ*/


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];
int cc0[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        int re1,re2;
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        //double dif = 0;
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            //dif += (double)(temp);
            cc[i] = temp;
            cc0[i] = temp;
        }
        sort(cc,cc+n);
        /*if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }*/
        bool ok = false;
        while(!ok)
        {
            if(rev)
            {
                pos.clear();
                num.clear();
                rere1.clear();
                rere2.clear();
                memset(ccin,true,sizeof(ccin));
                pos.clear();
                num.clear();
                for(int i=0;i<n;i++)
                {
                    int temp = cc0[i];
                    pos[temp].push_back(i+1);
                    num[temp]++;
                }
                sort(cc,cc+n);
            }
            int did;
            int nownum = n-1;
            int ti = 0;
            //int dif = cc[n-1]+1;
            int tempnownum;
            //double tempsum = 0;
            //int fi = n-1;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x1) / (double)(did);
                while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
                {
                    //cout << "&";
                    //if(ccin[nownum])
                    //{
                        ti++;
                        //tempsum += (double)(cc[nownum]);
                    //}
                    nownum--;
                }
                //cout << ti << "^^" << did << "^^"<< tempsum<< endl;
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    while(ti>did)
                    {
                        //tempsum -= (double)(cc[fi]);
                        //fi--;
                        ti--;
                    }
                    //double tempdif = 0;
                    ok = true;
                    /*for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        tempdif += cc[j] - (int)(temp);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                    }*/
                    //tempdif = tempsum - ceil(temp) * (double)(did);
                    //cout << tempdif <<  "&&" <<nownum << "&&" << did<< endl;
                    //if(tempdif < dif + eps)
                    //{
                        //dif = tempdif;
                        /*if(ok)
                        {
                            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                            {
                                int nowpos = cc[j];
                                rere1.clear();
                          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                                num[nowpos] ++;
                                ccin[j] = true;
                            }
                        }
                        else
                        {
                            ok = true;
                        }
                        for(int i=0,j=nownum+1;i<did;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.push_back(pos[nowpos][num[nowpos]-1]);
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] --;
                            ccin[j] = false;
                        }*/
                        tempnownum = nownum;
                        re1 = did;
                    //}
                    /*if(n==4&&x1==12&&x2==11)
                    {
                    }
                    else
                    {*/
                        break;
                    //}
                }
            }
            if(ok)
            {
                for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                {
                    int nowpos = cc[j];
                    rere1.push_back(pos[nowpos][num[nowpos]-1]);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                    num[nowpos] --;
                    ccin[j] = false;
                }
                ok = false;
                nownum = n-1;
                int ti = 0;
                for(did=1;did<=n;did++)
                {
                    double temp = (double)(x2) / (double)(did);
                    while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                    {
                    //    cout << "&";
                        if(ccin[nownum])
                        {
                            ti++;
                        }
                        nownum--;
                    }
                    //cout << ti << "*" << did << "*" << nownum <<endl;
                    if(ti>=did)
                    {
                        ok = true;
                        re2 = did;
                        for(int i=0,j=nownum+1;i<did;i++,j++)
                        {
                            while(!ccin[j])
                            {
                                j++;
                            }
                            int nowpos = cc[j];
                            rere2.push_back(pos[nowpos][num[nowpos]-1]);
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] --;
                            ccin[j] = false;
                        }
                        break;
                    }
                }
            }
            if(ok||rev)
            {
                break;
            }
            else
            {
                rev = true;
                int temp = x2;
                x2 = x1;
                x1 = temp;
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}

/*��С��ֵ
�򻯲���
�ٽ�����,��ʱ������ݷ�Χ
˫���жϣ��򻯲���*/


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        double dif = 0;
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            dif += (double)(temp);
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        //int dif = cc[n-1]+1;
        int tempnownum;
        double tempsum = 0;
        int fi = n-1;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
            {
                //cout << "&";
                //if(ccin[nownum])
                //{
                    ti++;
                    tempsum += (double)(cc[nownum]);
                //}
                nownum--;
            }
            //cout << ti << "^^" << did << "^^"<< tempsum<< endl;
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= (double)(cc[fi]);
                    fi--;
                    ti--;
                }
                double tempdif = 0;
                ok = true;
                /*for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    tempdif += cc[j] - (int)(temp);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                }*/
                tempdif = tempsum - ceil(temp) * (double)(did);
                //cout << tempdif <<  "&&" <<nownum << "&&" << did<< endl;
                if(tempdif < dif + eps)
                {
                    dif = tempdif;
                    /*if(ok)
                    {
                        for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.clear();
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] ++;
                            ccin[j] = true;
                        }
                    }
                    else
                    {
                        ok = true;
                    }
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        int nowpos = cc[j];
                        rere1.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }*/
                    tempnownum = nownum;
                    re1 = did;
                }
                //break;
            }
        }
        if(ok)
        {
            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
            {
                int nowpos = cc[j];
                rere1.push_back(pos[nowpos][num[nowpos]-1]);
          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                num[nowpos] --;
                ccin[j] = false;
            }
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}

/*��С��ֵ
�򻯲���
�ٽ�����,��ʱ������ݷ�Χ*/


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        int dif = x1;
        int tempnownum;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
            {
                //cout << "&";
                //if(ccin[nownum])
                //{
                    ti++;
                //}
                nownum--;
            }
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                int tempdif = 0;
                ok = true;
                for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    tempdif += cc[j] - (int)(temp);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                }
                if(tempdif < dif)
                {
                    dif = tempdif;
                    /*if(ok)
                    {
                        for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.clear();
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] ++;
                            ccin[j] = true;
                        }
                    }
                    else
                    {
                        ok = true;
                    }
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        int nowpos = cc[j];
                        rere1.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }*/
                    tempnownum = nownum;
                    re1 = did;
                }
                //break;
            }
        }
        if(ok)
        {
            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
            {
                int nowpos = cc[j];
                rere1.push_back(pos[nowpos][num[nowpos]-1]);
          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                num[nowpos] --;
                ccin[j] = false;
            }
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
double cc[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
            {
                //cout << "&";
                if(ccin[nownum])
                {
                    ti++;
                }
                nownum--;
            }
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                ok = true;
                re1 = did;
                for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    int nowpos = cc[j];
                    rere1.push_back(pos[nowpos][num[nowpos]-1]);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                    num[nowpos] --;
                    ccin[j] = false;
                }
                break;
            }
        }
        if(ok)
        {
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                        //cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <map>
#include <cmath>
#include <string>
#include <queue>
#include <stack>

using namespace std;

const int maxn = 3e5+10;

const double eps = 1e-6;

map<int,vector<int> > pos;
map<int,int> num;

vector<int> rere1,rere2;

bool ccin[maxn];
int cc[maxn];

int main()
{
    int n,x1,x2;
    //freopen("in.txt","r",stdin);
    ios::sync_with_stdio(false);
    while(cin >> n >> x1 >> x2)
    {
        bool rev = false;
        pos.clear();
        num.clear();
        rere1.clear();
        rere2.clear();
        memset(ccin,true,sizeof(ccin));
        long long dif = 1LL;
        for(int i=0;i<n;i++)
        {
            int temp;
            cin >> temp;
            pos[temp].push_back(i+1);
            num[temp]++;
            dif += (long long)(temp);
            cc[i] = temp;
        }
        sort(cc,cc+n);
        if(x1<x2)
        {
            rev = true;
            int temp = x2;
            x2 = x1;
            x1 = temp;
        }
        int did;
        bool ok = false;
        int re1,re2;
        int nownum = n-1;
        int ti = 0;
        //int dif = cc[n-1]+1;
        int tempnownum;
        long long tempsum = 0LL;
        int fi = n-1;
        for(did=1;did<=n;did++)
        {
            double temp = (double)(x1) / (double)(did);
            while(nownum>=0&&(/*(!ccin[nownum])||*/(temp-eps <= (double)(cc[nownum]))))
            {
                //cout << "&";
                //if(ccin[nownum])
                //{
                    ti++;
                    tempsum += (long long)(cc[nownum]);
                //}
                nownum--;
            }
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= (long long)(cc[fi]);
                    fi--;
                    ti--;
                }
                int tempdif = 0;
                ok = true;
                /*for(int i=0,j=nownum+1;i<did;i++,j++)
                {
                    tempdif += cc[j] - (int)(temp);
              //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                }*/
                tempdif = tempsum - (long long)(temp) * (long long)(did);
                if(tempdif < dif)
                {
                    dif = tempdif;
                    /*if(ok)
                    {
                        for(int i=0,j=tempnownum+1;i<re1;i++,j++)
                        {
                            int nowpos = cc[j];
                            rere1.clear();
                      //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                            num[nowpos] ++;
                            ccin[j] = true;
                        }
                    }
                    else
                    {
                        ok = true;
                    }
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        int nowpos = cc[j];
                        rere1.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }*/
                    tempnownum = nownum;
                    re1 = did;
                }
                //break;
            }
        }
        if(ok)
        {
            for(int i=0,j=tempnownum+1;i<re1;i++,j++)
            {
                int nowpos = cc[j];
                rere1.push_back(pos[nowpos][num[nowpos]-1]);
          //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                num[nowpos] --;
                ccin[j] = false;
            }
            ok = false;
            nownum = n-1;
            int ti = 0;
            for(did=1;did<=n;did++)
            {
                double temp = (double)(x2) / (double)(did);
                while(nownum>=0&&((!ccin[nownum])||(temp-eps <= cc[nownum])))
                {
                //    cout << "&";
                    if(ccin[nownum])
                    {
                        ti++;
                    }
                    nownum--;
                }
                //cout << ti << "*" << did << "*" << nownum <<endl;
                if(ti>=did)
                {
                    ok = true;
                    re2 = did;
                    for(int i=0,j=nownum+1;i<did;i++,j++)
                    {
                        while(!ccin[j])
                        {
                            j++;
                        }
                        int nowpos = cc[j];
                        rere2.push_back(pos[nowpos][num[nowpos]-1]);
                  //      cout << "#" << nowpos << "#" << num[nowpos] << "#" << pos[nowpos][num[nowpos]-1] << endl;
                        num[nowpos] --;
                        ccin[j] = false;
                    }
                    break;
                }
            }
        }
        if(ok)
        {
            if(rev)
            {
                cout << "Yes\n" << re2 << " " << re1 << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << endl;
            }
            else
            {
                cout << "Yes\n" << re1 << " " << re2 << "\n" << rere1[0];
                for(int i=1;i<re1;i++)
                {
                    cout << " " << rere1[i];
                }
                cout << "\n" << rere2[0];
                for(int i=1;i<re2;i++)
                {
                    cout << " " << rere2[i];
                }
                cout << "\n";
            }
        }
        else
        {
            cout << "No\n";
        }
    }
    return 0;
}

/*��С��ֵ
�򻯲���
�ٽ�����,��ʱ������ݷ�Χ*/


#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <limits>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdint>
using namespace std;typedef uint32_t ReplacementFor_ui;typedef uint64_t
ReplacementFor_ull;typedef int64_t ReplacementFor_ll;typedef long double
ReplacementFor_ld;typedef std::ReplacementFor_priority_queue<ReplacementFor_ll,
std::ReplacementFor_vector<ReplacementFor_ll>,std::ReplacementFor_greater<
ReplacementFor_ll> >ReplacementFor_Minheap;template<typename ReplacementFor_T>
void ReplacementFor_sort_vec(ReplacementFor_vector<ReplacementFor_T>&
ReplacementFor_v){ReplacementFor_sort(ReplacementFor_v.ReplacementFor_begin(),
ReplacementFor_v.ReplacementFor_end());}ReplacementFor_vector<
ReplacementFor_pair<int,int>>ReplacementFor_ser;ReplacementFor_ll
ReplacementFor_pref[300003];int ReplacementFor_n;inline ReplacementFor_ll
ReplacementFor_sum(int ReplacementFor_i,int ReplacementFor_j){return
ReplacementFor_pref[ReplacementFor_j]-ReplacementFor_pref[ReplacementFor_i];}
inline ReplacementFor_ll ReplacementFor_hm(int ReplacementFor_i,
ReplacementFor_ll ReplacementFor_a){if(ReplacementFor_a==(0xb8f+3455-0x190e))
return(0x393+7657-0x217c);if(ReplacementFor_i>=ReplacementFor_n)return 300003;
return(ReplacementFor_a/ReplacementFor_ser[ReplacementFor_i].
ReplacementFor_first)+ReplacementFor_ll((ReplacementFor_a%ReplacementFor_ser[
ReplacementFor_i].ReplacementFor_first)!=(0x18ed+1937-0x207e));}inline bool
ReplacementFor_poss(int ReplacementFor_i,ReplacementFor_ll ReplacementFor_a,
ReplacementFor_ll ReplacementFor_b){ReplacementFor_ll ReplacementFor_pos1=
ReplacementFor_hm(ReplacementFor_i,ReplacementFor_a);ReplacementFor_ll
ReplacementFor_pos2=ReplacementFor_hm(ReplacementFor_i+ReplacementFor_pos1,
ReplacementFor_b);return(ReplacementFor_i+ReplacementFor_pos1+
ReplacementFor_pos2<=ReplacementFor_n);}int main(){std::ReplacementFor_ios_base
::ReplacementFor_sync_with_stdio(false);std::ReplacementFor_cin.
ReplacementFor_tie(nullptr);ReplacementFor_ll ReplacementFor_a,ReplacementFor_b;
ReplacementFor_cin>>ReplacementFor_n>>ReplacementFor_a>>ReplacementFor_b;
ReplacementFor_ser.ReplacementFor_resize(ReplacementFor_n);for(int
ReplacementFor_i=(0x132+1419-0x6bd);ReplacementFor_i<ReplacementFor_n;++
ReplacementFor_i){ReplacementFor_cin>>ReplacementFor_ser[ReplacementFor_i].
ReplacementFor_first;ReplacementFor_ser[ReplacementFor_i].ReplacementFor_second=
ReplacementFor_i;}ReplacementFor_sort_vec(ReplacementFor_ser);int
ReplacementFor_ind1=-(0x12a5+4124-0x22c0),ReplacementFor_ind2=-
(0x34c+2381-0xc98);for(int ReplacementFor_i=(0xd05+2514-0x16d7);ReplacementFor_i
<ReplacementFor_n;++ReplacementFor_i){if(ReplacementFor_poss(ReplacementFor_i,
ReplacementFor_a,ReplacementFor_b)){ReplacementFor_ind1=ReplacementFor_i;break;}
if(ReplacementFor_poss(ReplacementFor_i,ReplacementFor_b,ReplacementFor_a)){
ReplacementFor_ind2=ReplacementFor_i;break;}}if(ReplacementFor_ind1==-
(0xeb+9762-0x270c)&&ReplacementFor_ind2==-(0x1a70+2157-0x22dc)){
ReplacementFor_cout<<"\x4e\x6f"<<ReplacementFor_endl;return(0x109c+3754-0x1f46);
}ReplacementFor_cout<<"\x59\x65\x73"<<ReplacementFor_endl;if(ReplacementFor_ind1
!=-(0x20f0+255-0x21ee)){ReplacementFor_ll ReplacementFor_pos1=ReplacementFor_hm(
ReplacementFor_ind1,ReplacementFor_a);ReplacementFor_ll ReplacementFor_pos2=
ReplacementFor_hm(ReplacementFor_ind1+ReplacementFor_pos1,ReplacementFor_b);
ReplacementFor_cout<<ReplacementFor_pos1<<((char)(0x731+10-0x71b))<<
ReplacementFor_pos2<<ReplacementFor_endl;for(int ReplacementFor_i=
ReplacementFor_ind1;ReplacementFor_i<ReplacementFor_ind1+ReplacementFor_pos1;++
ReplacementFor_i)ReplacementFor_cout<<ReplacementFor_ser[ReplacementFor_i].
ReplacementFor_second+(0x251a+226-0x25fb)<<((char)(0x11ff+1934-0x196d));
ReplacementFor_cout<<ReplacementFor_endl;for(int ReplacementFor_i=
ReplacementFor_ind1+ReplacementFor_pos1;ReplacementFor_i<ReplacementFor_ind1+
ReplacementFor_pos1+ReplacementFor_pos2;++ReplacementFor_i)ReplacementFor_cout<<
ReplacementFor_ser[ReplacementFor_i].ReplacementFor_second+(0x7b3+1808-0xec2)<<
((char)(0x1c7+5562-0x1761));ReplacementFor_cout<<ReplacementFor_endl;return
(0xdf4+5868-0x24e0);}if(ReplacementFor_ind2!=-(0x827+6902-0x231c)){
ReplacementFor_ll ReplacementFor_pos1=ReplacementFor_hm(ReplacementFor_ind2,
ReplacementFor_b);ReplacementFor_ll ReplacementFor_pos2=ReplacementFor_hm(
ReplacementFor_ind2+ReplacementFor_pos1,ReplacementFor_a);ReplacementFor_cout<<
ReplacementFor_pos2<<((char)(0xe76+1337-0x138f))<<ReplacementFor_pos1<<
ReplacementFor_endl;for(int ReplacementFor_i=ReplacementFor_ind2+
ReplacementFor_pos1;ReplacementFor_i<ReplacementFor_ind2+ReplacementFor_pos1+
ReplacementFor_pos2;++ReplacementFor_i)ReplacementFor_cout<<ReplacementFor_ser[
ReplacementFor_i].ReplacementFor_second+(0x9bc+4074-0x19a5)<<
((char)(0x4fb+4832-0x17bb));ReplacementFor_cout<<ReplacementFor_endl;for(int
ReplacementFor_i=ReplacementFor_ind2;ReplacementFor_i<ReplacementFor_ind2+
ReplacementFor_pos1;++ReplacementFor_i)ReplacementFor_cout<<ReplacementFor_ser[
ReplacementFor_i].ReplacementFor_second+(0x7c0+2413-0x112c)<<
((char)(0xdad+4682-0x1fd7));ReplacementFor_cout<<ReplacementFor_endl;}return
(0x8bf+5249-0x1d40);}


#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <limits>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <cstdint>
using namespace std;typedef uint32_t ui;typedef uint64_t ull;typedef int64_t ll;
typedef long double ld;typedef std::priority_queue<ll,std::vector<ll>,std::
greater<ll> >Minheap;template<typename T>void sort_vec(vector<T>&v){sort(v.begin
(),v.end());}vector<pair<int,int>>ser;ll pref[300003];int n;inline ll sum(int i,
int j){return pref[j]-pref[i];}inline ll hm(int i,ll a){if(a==
(0x988+1814-0x109e))return(0x12d7+434-0x1489);if(i>=n)return 300003;return(a/ser
[i].first)+ll((a%ser[i].first)!=(0x4cd+3339-0x11d8));}inline bool poss(int i,ll
a,ll b){ll pos1=hm(i,a);ll pos2=hm(i+pos1,b);return(i+pos1+pos2<=n);}int main(){
std::ios_base::sync_with_stdio(false);std::cin.tie(nullptr);ll a,b;cin>>n>>a>>b;
ser.resize(n);for(int i=(0x670+54-0x6a6);i<n;++i){cin>>ser[i].first;ser[i].
second=i;}sort_vec(ser);int ind1=-(0x1ab2+1382-0x2017),ind2=-
(0x10e2+1313-0x1602);for(int i=(0xfd2+3057-0x1bc3);i<n;++i){if(poss(i,a,b)){ind1
=i;break;}if(poss(i,b,a)){ind2=i;break;}}if(ind1==-(0x686+7630-0x2453)&&ind2==-
(0x5b8+3352-0x12cf)){cout<<"\x4e\x6f"<<endl;return(0x1a93+812-0x1dbf);}cout<<
"\x59\x65\x73"<<endl;if(ind1!=-(0x672+7582-0x240f)){ll pos1=hm(ind1,a);ll pos2=
hm(ind1+pos1,b);cout<<pos1<<((char)(0x2a6+167-0x32d))<<pos2<<endl;for(int i=ind1
;i<ind1+pos1;++i)cout<<ser[i].second+(0x171b+3965-0x2697)<<
((char)(0x4e0+3027-0x1093));cout<<endl;for(int i=ind1+pos1;i<ind1+pos1+pos2;++i)
cout<<ser[i].second+(0x2c9+331-0x413)<<((char)(0xe6d+2317-0x175a));cout<<endl;
return(0x3a5+2353-0xcd6);}if(ind2!=-(0x2f6+1330-0x827)){ll pos1=hm(ind2,b);ll
pos2=hm(ind2+pos1,a);cout<<pos2<<((char)(0xbd4+2045-0x13b1))<<pos1<<endl;for(int
 i=ind2+pos1;i<ind2+pos1+pos2;++i)cout<<ser[i].second+(0xce2+645-0xf66)<<
((char)(0x641+5225-0x1a8a));cout<<endl;for(int i=ind2;i<ind2+pos1;++i)cout<<ser[
i].second+(0x6f8+3473-0x1488)<<((char)(0x538+7599-0x22c7));cout<<endl;}return
(0x1901+2127-0x2150);}


 //keep trying :)
#include <bits/stdc++.h>
#define float long double
#define int long long
#define ll long long
#define PB push_back
#define MP make_pair
#define  ss second
#define ff first
#define PI 3.14159265
#define inf 9*(1e18)
#define fastrack ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int M = 2*(1e5) + 7,  mod = 1e9 + 7;

signed main(){
    fastrack;
    //int tt; cin >> tt; while(tt--)
    {
        int n, x1, x2;
        cin >> n >> x1 >> x2;
        vector <pair<int, int>> v;
        v.PB({-1, -1});
        for(int i = 1; i <= n; i++){
            int x;
            cin >> x;
            v.PB({x, i});
        }
        sort(v.begin(), v.end());
        bool ok = 0;
        for(int i = 1; i <= n - 1; i++){
            int lo = i, hi = n - 1;
            while(lo <= hi){
                int mid = (lo + hi)/2;
                int x = (mid - i + 1);
                int y = (n - mid);
                int lo1 = v[i].ff, lo2 = v[mid + 1].ff;
                float p = x1/(float)x;
                float q = x2/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << "Yes" << "\n";
                    cout << x << " " << y << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    return 0;
                }
                if(p <= lo1)
                    hi = mid - 1;
                else
                    lo = mid + 1;
            }
        }
        swap(x1, x2);
        for(int i = 1; i <= n - 1; i++){
            int lo = i, hi = n - 1;
            while(lo <= hi){
                int mid = (lo + hi)/2;
                int x = (mid - i + 1);
                int y = (n - mid);
                int lo1 = v[i].ff, lo2 = v[mid + 1].ff;
                float p = x1/(float)x;
                float q = x2/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << "Yes" << "\n";
                    cout << y << " " << x << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    return 0;
                }
                if(p <= lo1)
                    hi = mid - 1;
                else
                    lo = mid + 1;
            }
        }
        if(!ok)
            cout << "No" << "\n";
    }
    return 0;
}


 //keep trying :)
#include <bits/stdc++.h>
#define float long double
#define int long long
#define ll long long
#define PB push_back
#define MP make_pair
#define  ss second
#define ff first
#define PI 3.14159265
#define inf 9*(1e18)
#define fastrack ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int M = 2*(1e5) + 7,  mod = 1e9 + 7;

signed main(){
    fastrack;
    //int tt; cin >> tt; while(tt--)
    {
        int n, x1, x2;
        cin >> n >> x1 >> x2;
        vector <pair<int, int>> v;
        v.PB({-1, -1});
        for(int i = 1; i <= n; i++){
            int x;
            cin >> x;
            v.PB({x, i});
        }
        sort(v.begin(), v.end());
        bool ok = 0;
        for(int i = 1; i <= n - 1; i++){
            int lo = i, hi = n - 1;
            while(lo <= hi){
                int mid = (lo + hi)/2;
                int x = (mid - i + 1);
                int y = (n - mid);
                int lo1 = v[i].ff, lo2 = v[mid + 1].ff;
                float p = x1/(float)x;
                float q = x2/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << "Yes" << "\n";
                    cout << x << " " << y << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    break;
                }
                p = x2/(float)x;
                q = x1/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << "Yes" << "\n";
                    cout << y << " " << x << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    break;
                }
                lo = mid + 1;
            }
            if(ok)
                break;
        }
        if(!ok)
            cout << "No" << "\n";
    }
    return 0;
}


 //keep trying :)
#include <bits/stdc++.h>
#define float long double
#define int long long
#define ll long long
#define PB push_back
#define MP make_pair
#define  ss second
#define ff first
#define PI 3.14159265
#define inf 9*(1e18)
#define fastrack ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
const int M = 2*(1e5) + 7,  mod = 1e9 + 7;

signed main(){
    fastrack;
    //int tt; cin >> tt; while(tt--)
    {
        int n, x1, x2;
        cin >> n >> x1 >> x2;
        vector <pair<int, int>> v;
        v.PB({-1, -1});
        for(int i = 1; i <= n; i++){
            int x;
            cin >> x;
            v.PB({x, i});
        }
        sort(v.begin(), v.end());
        bool ok = 0;
        for(int i = 1; i <= n - 1; i++){
            int lo = i, hi = n - 1;
            while(lo <= hi){
                int mid = (lo + hi)/2;
                int x = (mid - i + 1);
                int y = (n - mid);
                int lo1 = v[i].ff, lo2 = v[mid + 1].ff;
                float p = x1/(float)x;
                float q = x2/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << x << " " << y << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    break;
                }
                p = x2/(float)x;
                q = x1/(float)y;
                if(lo1 >= p && lo2 >= q){
                    ok = 1;
                    cout << y << " " << x << "\n";
                    for(int j = mid + 1; j <= n; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    for(int j = i; j <= mid; j++){
                        cout << v[j].ss << " ";
                    }
                    cout << "\n";
                    break;
                }
                lo = mid + 1;
            }
            if(ok)
                break;
        }
        if(!ok)
            cout << "No" << "\n";
    }
    return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int a[300010];
int main()
{
	int n,s1,s2;
	scanf("%d%d%d",&n,&s1,&s2);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	for(int i=1;i<=n;i++)
	{
		int flag=0;
		int num=s1%a[i]?s1/a[i]+1:s1/a[i];
		int j=i+num;
		if(a[j]*(n-j+1)>=s2) flag=1;
		if(flag)
		{
			cout<<"Yes"<<endl;
			cout<<num<<' '<<n-j+1<<endl;
			for(int k=i;k<i+num;k++) cout<<a[k]<<' ';
			cout<<endl;
			for(int k=i+num;k<=n;k++) cout<<a[k]<<' ';
			return 0;
		}
		num=s2%a[i]?s2/a[i]+1:s2/a[i];
		j=i+num;
		if(a[j]*(n-j+1)>=s1) flag=1;
		if(flag)
		{
			cout<<"Yes"<<endl;
			cout<<n-j+1<<' '<<num<<endl;
			for(int k=i+num;k<=n;k++) cout<<a[k]<<' ';
			cout<<endl;
			for(int k=i;k<i+num;k++) cout<<a[k]<<' ';
			return 0;
		}
	}
	cout<<"No";
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
struct node{
	int val,ind;
}a[300010];
bool cmp(node a,node b)
{
	return a.val<b.val;
}
int main()
{
	int n,s1,s2;
	scanf("%d%d%d",&n,&s1,&s2);
	for(int i=1;i<=n;i++) scanf("%d",&a[i].val),a[i].ind=i;
	sort(a+1,a+n+1,cmp);
	for(int i=1;i<=n;i++)
	{
		int flag=0;
		int num=s1%a[i].val?s1/a[i].val+1:s1/a[i].val;
		int j=i+num;
		if(a[j].val*(n-j+1)>=s2) flag=1;
		if(flag)
		{
			cout<<"Yes"<<endl;
			cout<<num<<' '<<n-j+1<<endl;
			for(int k=i;k<i+num;k++) cout<<a[k].ind<<' ';
			cout<<endl;
			for(int k=i+num;k<=n;k++) cout<<a[k].ind<<' ';
			return 0;
		}
		num=s2%a[i].val?s2/a[i].val+1:s2/a[i].val;
		j=i+num;
		if(a[j].val*(n-j+1)>=s1) flag=1;
		if(flag)
		{
			cout<<"Yes"<<endl;
			cout<<n-j+1<<' '<<num<<endl;
			for(int k=i+num;k<=n;k++) cout<<a[k].ind<<' ';
			cout<<endl;
			for(int k=i;k<i+num;k++) cout<<a[k].ind<<' ';
			return 0;
		}
	}
	cout<<"No";
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
struct node{
	int val,ind;
}a[600010];
bool cmp(node a,node b)
{
	return a.val<b.val;
}
int main()
{
	int n,s1,s2;
	scanf("%d%d%d",&n,&s1,&s2);
	for(int i=1;i<=n;i++) scanf("%d",&a[i].val),a[i].ind=i;
	sort(a+1,a+n+1,cmp);
	for(int i=1;i<=n;i++)
	{
		int flag=0;
		int num=s1%a[i].val?s1/a[i].val+1:s1/a[i].val;
		int j=i+num;
		if(j<=n)
		{
			if((long long)a[j].val*(n-j+1)>=s2) flag=1;
			if(flag)
			{
				cout<<"Yes"<<endl;
				cout<<num<<' '<<n-j+1<<endl;
				for(int k=i;k<i+num;k++) cout<<a[k].ind<<' ';
				cout<<endl;
				for(int k=i+num;k<=n;k++) cout<<a[k].ind<<' ';
				return 0;
			}
		}
		num=s2%a[i].val?s2/a[i].val+1:s2/a[i].val;
		j=i+num;
		if(j<=n)
		{
			if((long long)a[j].val*(n-j+1)>=s1) flag=1;
			if(flag)
			{
				cout<<"Yes"<<endl;
				cout<<n-j+1<<' '<<num<<endl;
				for(int k=i+num;k<=n;k++) cout<<a[k].ind<<' ';
				cout<<endl;
				for(int k=i;k<i+num;k++) cout<<a[k].ind<<' ';
				return 0;
			}
		}
	}
	cout<<"No";
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2);
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), a[i].second = i;

    sort(a, a + n, greater< pair<int, int> >());

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            ll ppSum = 0;
            for (int j = i + 1; j < n; j++){
                ppSum += (ll)a[j].first;
                if (ppSum >= x2 && (ld)x2 / (j - (i + 1) + 1) <= a[j].first){
                    printf("Yes\n");
                    printf("%d %d\n", i + 1, j - (i + 1) + 1);
                    for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1); printf("\n");
                    for (int k = i + 1; k <= j; k++) printf("%d ", a[k].second + 1); printf("\n");
                    return 0;
                }
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            ll ppSum = 0;
            for (int j = i + 1; j < n; j++){
                ppSum += (ll)a[j].first;
                if (ppSum >= x2 && (ld)x2 / (j - (i + 1) + 1) <= a[j].first){
                    printf("Yes\n");
                    printf("%d %d\n", j - (i + 1) + 1, i + 1);
                    for (int k = i + 1; k <= j; k++) printf("%d ", a[k].second + 1); printf("\n");
                    for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1); printf("\n");
                    return 0;
                }
            }
        }
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2); ll sum = 0;
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), sum += (ll)a[i].first, a[i].second = i;

    sort(a, a + n, greater<int>());

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", i + 1, n - i - 1);
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n - i - 1, i + 1);
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);

    bool flag = true;
    pSum = 0;
    int i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
                return 0;
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    swap(x1, x2);
    flag = true;
    pSum = 0;
    i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2);
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), a[i].second = i;

    sort(a, a + n, greater< pair<int, int> >());

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            ll ppSum = 0;
            for (int j = i + 1; j < n; j++){
                ppSum += (ll)a[j].first;
                if (ppSum >= x2 && (ld)x2 / (j - (i + 1) + 1) <= a[j].first){
                    printf("Yes\n");
                    printf("%d %d\n", i + 1, j - (i + 1) + 1);
                    for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1); printf("\n");
                    for (int k = i + 1; k <= j; k++) printf("%d ", a[k].second + 1); printf("\n");
                    return 0;
                }
            }
            break;
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            ll ppSum = 0;
            for (int j = i + 1; j < n; j++){
                ppSum += (ll)a[j].first;
                if (ppSum >= x2 && (ld)x2 / (j - (i + 1) + 1) <= a[j].first){
                    printf("Yes\n");
                    printf("%d %d\n", j - (i + 1) + 1, i + 1);
                    for (int k = i + 1; k <= j; k++) printf("%d ", a[k].second + 1); printf("\n");
                    for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1); printf("\n");
                    return 0;
                }
            }
            break;
        }
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2); ll sum = 0;
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), sum += (ll)a[i].first, a[i].second = i;

    sort(a, a + n);

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", i + 1, n - i - 1);
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n - i - 1, i + 1);
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);

    bool flag = true;
    pSum = 0;
    int i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
                return 0;
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    swap(x1, x2);
    flag = true;
    pSum = 0;
    i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2); ll sum = 0;
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), sum += (ll)a[i].first, a[i].second = i;

    sort(a, a + n, greater< pair<int, int> >());

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", i + 1, n - i - 1);
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n - i - 1, i + 1);
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);

    bool flag = true;
    pSum = 0;
    int i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
                return 0;
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    swap(x1, x2);
    flag = true;
    pSum = 0;
    i = 0, j = n - 1, n1 = 0;
    while(i + 1 < j){
        if (flag) pSum += a[i].first, n1++;
        else pSum += a[j].first, n1++;

        if (pSum >= x1 && (ld)x1 / (n1) <= a[0].first){
            if (sum - pSum >= x2 && (ld)x2 / (n - n1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n1, n - n1);
                for (int k = 0; k <= i; k++) printf("%d ", a[k].second + 1);
                for (int k = n - 1; k >= j; k--) printf("%d ", a[k].second + 1); printf("\n");
                for (int k = i + 1; k < j; k++) printf("%d ", a[k].second + 1);
            }
        }

        if (flag) i++;
        else j--;
        flag = !flag;
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2); ll sum = 0;
    for (int i = 0; i < n; i++) scanf("%d", &a[i]), sum += (ll)a[i].first, a[i].second = i;

    sort(a, a + n);

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", i + 1, n - i - 1);
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[0].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[i + 1].first){
                printf("Yes\n");
                printf("%d %d\n", n - i - 1, i + 1);
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    printf("No\n");
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef long double ld;

pair<int, int> a[300010];

int main()
{
    int n, x1, x2; scanf("%d %d %d", &n, &x1, &x2); ll sum = 0;
    for (int i = 0; i < n; i++) scanf("%d", &a[i].first), sum += (ll)a[i].first, a[i].second = i;

    sort(a, a + n, greater< pair<int, int> >());

    ll pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[n - 1].first){
                printf("Yes\n");
                printf("%d %d\n", i + 1, n - i - 1);
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    swap(x1, x2);
    pSum = 0;
    for (int i = 0; i < n - 1; i++){
        pSum += (ll)a[i].first;
        if (pSum >= x1 && (ld)x1 / (i + 1) <= a[i].first){
            if ((sum - pSum) >= x2 && (ld)x2 / (n - i - 1) <= a[n - 1].first){
                printf("Yes\n");
                printf("%d %d\n", n - i - 1, i + 1);
                for (int j = i + 1; j < n; j++) printf("%d ", a[j].second + 1); printf("\n");
                for (int j = 0; j < i + 1; j++) printf("%d ", a[j].second + 1);
                return 0;
            }
        }
    }

    printf("No\n");
    return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> pii;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define sll(n) scanf("%lld",&n)
#define sll2(x,y) scanf("%lld%lld",&x,&y)
#define sll3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z)
#define debug(x) cerr<<#x<<"::"<<x<<endl
#define debug2(x,y) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"
#define debug3(x,y,z) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"
#define debug4(x,y,z,w) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<"\n"
const int N = 3e5+5;
const double EPS = 1e-9;
ll n,x1,x2,C[N],suf[N];
vector<ll>A,B;
pll P[N];
int main() {

	sll3(n,x1,x2);
	for(int i = 1;i <= n;++i) sll(C[i]),P[i] = {C[i],i};
	sort(P+1,P+1+n);
	suf[n] = P[n].F;
	for(int i = n-1;i >= 1;--i) suf[i] = max(suf[i+1], P[i].F);
	bool fl = 0;
	for(ll x = 1;x < n;++x) {
		//ll y = n-x;
		ll val = ceil((double)x2/x);
		//debug2(x,val);
		ll lo = 1,hi = n,mid,ans = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= val) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		if(!ans) continue;
		ll tot = n-ans+1;
		if(tot<x) continue;
		ll l = ans,r = ans+x-1,co = 0,mx = 1e9+7;
		ll sum = 0;
		//debug2(l,r);
		for(ll j = n;j > r;--j) {
			co++;
			mx = min(mx,P[j].F);
			sum = ceil((double)x1/co);
			A.pb(P[j].S);
			//debug2(sum,mx);
			if(sum <= mx) {
				fl = 1;
				break;
			}
		}
		if(!fl) {
			for(ll j = l - 1;j > 0;--j) {
				co++;
				mx = min(mx,P[j].F);
				sum = ceil((double)x1/co);
				A.pb(P[j].S);
				//debug2(sum,mx);
				if(sum <= mx) {
					fl = 1;
					break;
				}
			}
		}
		for(int j = l;j <= r;++j) B.pb(P[j].S);
		break;
	}
	if(!fl) {
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	printf("%d %d\n",(int)A.size(),(int)B.size());
	for(auto u:A) printf("%lld ",u);
	printf("\n");
	for(auto u:B) printf("%lld ",u);
	printf("\n");

	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> pii;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define sll(n) scanf("%lld",&n)
#define sll2(x,y) scanf("%lld%lld",&x,&y)
#define sll3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z)
#define debug(x) cerr<<#x<<"::"<<x<<endl
#define debug2(x,y) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"
#define debug3(x,y,z) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"
#define debug4(x,y,z,w) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<"\n"
const int N = 3e5+5;
ll n,x1,x2,C[N];
vector<ll>A,B;
pll P[N];
int main() {

	sll3(n,x1,x2);
	for(int i = 1;i <= n;++i) sll(C[i]),P[i] = {C[i],i};
	sort(P+1,P+1+n);
	bool fl = 0;
	for(ll x = 1;x < n;++x) {
		ll y = n-x;
		ll val = ceil((double)x1/x);
		ll lo = 1,hi = n,mid,ans = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= val) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		if(!ans) continue;
		ll tot = n-ans+1;
		if(tot<x) continue;
		ll l = ans,r = ans+x-1;
		ll cal = ceil((double)x2/y);
		lo = 1,hi = l-1,ans = l,tot = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		ll le = ans,ri;
		tot+=(l-1-ans+1);
		lo = r+1,hi = n,ans = n+1;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid-1;
			else lo = mid+1;
		}
		tot+=(n-ans+1);
		if(tot<y) continue;
		ri = ans;
		ll cnt = 0;
		for(int j = l;j <= r;++j) A.pb(P[j].S);
		for(int j = le;j < l;++j) {
			B.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		for(int j = ri;j <= n;++j) {
			B.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		fl = 1;
		break;
	}
	if(!fl) {
		printf("No\n");
		return 0;
	}
	printf("Yes\n");
	printf("%d %d\n",(int)A.size(),(int)B.size());
	for(auto u:A) printf("%lld ",u);
	printf("\n");
	for(auto u:B) printf("%lld ",u);
	printf("\n");

	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> pii;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define sll(n) scanf("%lld",&n)
#define sll2(x,y) scanf("%lld%lld",&x,&y)
#define sll3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z)
#define debug(x) cerr<<#x<<"::"<<x<<endl
#define debug2(x,y) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"
#define debug3(x,y,z) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"
#define debug4(x,y,z,w) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<"\n"
const int N = 3e5+5;
const double EPS = 1e-9;
ll n,x1,x2,C[N];
vector<ll>A,B;
pll P[N];
int main() {

	sll3(n,x1,x2);
	for(int i = 1;i <= n;++i) sll(C[i]),P[i] = {C[i],i};
	sort(P+1,P+1+n);
	bool fl = 0;
	for(ll x = 1;x < n;++x) {
		ll y = n-x;
		ll val = ceil((double)x1/x);
		ll lo = 1,hi = n,mid,ans = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= val) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		if(!ans) continue;
		ll tot = n-ans+1;
		if(tot<x) continue;
		ll l = ans,r = ans+x-1;
		ll cal = ceil((double)x2/y);
		lo = 1,hi = l-1,ans = l,tot = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		ll le = ans,ri;
		tot+=(l-1-ans+1);
		lo = r+1,hi = n,ans = n+1;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid-1;
			else lo = mid+1;
		}
		tot+=(n-ans+1);
		if(tot<y) continue;
		ri = ans;
		ll cnt = 0;
		for(int j = l;j <= r;++j) A.pb(P[j].S);
		for(int j = le;j < l;++j) {
			B.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		for(int j = ri;j <= n;++j) {
			B.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		fl = 1;
		break;
	}
	if(!fl) {
		printf("No\n");
		return 0;
	}
	double sa = (double)x1/A.size(),sb = (double)x2/B.size();
	for(auto u:A) {
		if(!(C[u] > sa || (C[u]-sa < EPS))) assert(0);
	}
	for(auto u:B) {
		if(!(C[u] > sb || (C[u]-sb < EPS))) assert(0);
	}
	printf("Yes\n");
	printf("%d %d\n",(int)A.size(),(int)B.size());
	for(auto u:A) printf("%lld ",u);
	printf("\n");
	for(auto u:B) printf("%lld ",u);
	printf("\n");

	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> pii;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define sll(n) scanf("%lld",&n)
#define sll2(x,y) scanf("%lld%lld",&x,&y)
#define sll3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z)
#define debug(x) cerr<<#x<<"::"<<x<<endl
#define debug2(x,y) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"
#define debug3(x,y,z) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"
#define debug4(x,y,z,w) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<"\n"
const int N = 3e5+5;
ll C[N],n;
pll P[N];
bool doit(ll x1,ll x2,bool flag) {

	ll cnt = 0,idx = 0;
	vector<ll>A,B;
	for(int i = n; i >= 1;--i) {
		++cnt;
		ll val = ceil((double)x1/cnt);
		A.pb(P[i].S);
		if(val <= P[i].F) {
			idx = i;
			break;
		}
	}
	if(!idx) return 0;
	cnt = 0;
	ll pos = 0;
	for(int i = idx - 1;i > 0;--i) {
		++cnt;
		ll val = ceil((double)x2/cnt);
		B.pb(P[i].S);
		if(val <= P[i].F) {
			pos = i;
			break;
		}
	}
	if(!pos) return 0;
	if(!flag) swap(A,B);
	printf("Yes\n");
	printf("%d %d\n",(int)A.size(),(int)B.size());
	for(auto u:A) printf("%lld ",u);
	printf("\n");
	for(auto u:B) printf("%lld ",u);
	printf("\n");
	return 1;
}
int main() {
	ll x1,x2;
	sll3(n,x1,x2);
	for(int i = 1;i <= n;++i) sll(C[i]),P[i] = {C[i],i};
	sort(P+1,P+1+n);
	bool fl = doit(x1,x2,1);
	if(!fl) fl = doit(x2,x1,0);
	if(!fl) printf("No\n");

	return 0;
}


//long time no ac
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int ,int> pii;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define sll(n) scanf("%lld",&n)
#define sll2(x,y) scanf("%lld%lld",&x,&y)
#define sll3(x,y,z) scanf("%lld%lld%lld",&x,&y,&z)
#define debug(x) cerr<<#x<<"::"<<x<<endl
#define debug2(x,y) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n"
#define debug3(x,y,z) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n"
#define debug4(x,y,z,w) cerr<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\t"<<#w<<" :: "<<w<<"\n"
const int N = 3e5+5;
const double EPS = 1e-9;
ll n,x1,x2,C[N];
vector<ll>A,B;
pll P[N];
int main() {

	sll3(n,x1,x2);
	for(int i = 1;i <= n;++i) sll(C[i]),P[i] = {C[i],i};
	sort(P+1,P+1+n);
	bool fl = 0;
	for(ll x = 1;x < n;++x) {
		ll y = n-x;
		ll val = ceil((double)x2/x);
		ll lo = 1,hi = n,mid,ans = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= val) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		if(!ans) continue;
		ll tot = n-ans+1;
		if(tot<x) continue;
		ll l = ans,r = ans+x-1;
		ll cal = ceil((double)x1/y);
		lo = 1,hi = l-1,ans = l,tot = 0;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid - 1;
			else lo = mid + 1;
		}
		ll le = ans,ri;
		tot+=(l-1-ans+1);
		lo = r+1,hi = n,ans = n+1;
		while(lo <= hi) {
			mid = (lo+hi)>>1;
			if(P[mid].F >= cal) ans = mid,hi = mid-1;
			else lo = mid+1;
		}
		tot+=(n-ans+1);
		if(tot<y) continue;
		ri = ans;
		ll cnt = 0;
		for(int j = l;j <= r;++j) B.pb(P[j].S);
		for(int j = le;j < l;++j) {
			A.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		for(int j = ri;j <= n;++j) {
			A.pb(P[j].S);
			++cnt;
			if(cnt == y) break;
		}
		fl = 1;
		break;
	}
	if(!fl) {
		printf("No\n");
		return 0;
	}
	double sa = (double)x1/A.size(),sb = (double)x2/B.size();
	for(auto u:A) {
		if(!(C[u] > sa || (C[u]-sa < EPS))) assert(0);
	}
	for(auto u:B) {
		if(!(C[u] > sb || (C[u]-sb < EPS))) assert(0);
	}
	printf("Yes\n");
	printf("%d %d\n",(int)A.size(),(int)B.size());
	for(auto u:A) printf("%lld ",u);
	printf("\n");
	for(auto u:B) printf("%lld ",u);
	printf("\n");

	return 0;
}


#include<bits/stdc++.h>
#define ll long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

pair<int,int> a[N];
int32_t main()
{
   ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(0); srand(time(0));
   int n,x1,x2;  cin>>n>>x1>>x2;
   for(int i=1;i<=n;i++)  cin>>a[i].fi,a[i].se=i;
   sort(a+1,a+1+n);
   for(int k=1;k<=n;k++)
   {
       int ts=a[n-k+1].fi;
       int u=(x1+ts-1)/ts;
       int v=k-u;
       if(v>=1&&(x2+v-1)/v<=a[n-v+1].fi)
       {
           cout<<"Yes"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-k+1;i<n-v+1;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-v+1;i<=n;i++) cout<<a[i].se<<" ";
           return 0;
       }
       v=(x2+ts-1)/ts;
       u=k-v;
       if(u>=1&&x1+u-1/u<=a[n-u+1].fi)
       {
           cout<<"Yes"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-u+1;i<=n;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-k+1;i<n-u+1;i++) cout<<a[i].se<<" ";
           return 0;
       }
   }
   cout<<"No";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

pair<int,int> a[N];
int32_t main()
{
   ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(0); srand(time(0));
   int n,x1,x2;  cin>>n>>x1>>x2;
   for(int i=1;i<=n;i++)  cin>>a[i].fi,a[i].se=i;
   sort(a+1,a+1+n);
   for(int k=1;k<=n;k++)
   {
       int ts=a[n-k+1].fi;
       int u=(x1+ts-1)/ts;
       int v=k-u;
       if(v>=1&&(x2+v-1)/v<=a[n-v+1].fi)
       {
           cout<<"YES"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-k+1;i<n-v+1;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-v+1;i<=n;i++) cout<<a[i].se<<" ";
           return 0;
       }
       v=(x2+ts-1)/ts;
       u=k-v;
       if(u>=1&&x1+u-1/u<=a[n-u+1].fi)
       {
           cout<<"YES"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-u+1;i<=n;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-k+1;i<n-u+1;i++) cout<<a[i].se<<" ";
           return 0;
       }
   }
   cout<<"NO";
return 0;
}
/*

*/


#include<bits/stdc++.h>
#define ll long long
#define int long long
#define inf (1LL<<61)
#define fi first
#define se second
#define pb push_back
#define pa pair<int,int>
#define mkp(a,b) make_pair(a,b)
const int N=1e6+10;
const int mod=1e9+7;
int dir[4][2]={0,1,1,0,0,-1,-1,0};
using namespace std;

pair<int,int> a[N];
int32_t main()
{
   ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(0); srand(time(0));
   int n,x1,x2;  cin>>n>>x1>>x2;
   for(int i=1;i<=n;i++)  cin>>a[i].fi,a[i].se=i;
   sort(a+1,a+1+n);
   for(int k=1;k<=n;k++)
   {
       int ts=a[n-k+1].fi;
       int u=(x1+ts-1)/ts;
       int v=k-u;
       if(v>=1&&(x2+v-1)/v<=a[n-v+1].fi)
       {
           cout<<"Yes"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-k+1;i<n-v+1;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-v+1;i<=n;i++) cout<<a[i].se<<" ";
           return 0;
       }
       v=(x2+ts-1)/ts;
       u=k-v;
       if(u>=1&&(x1+u-1)/u<=a[n-u+1].fi)
       {
           cout<<"Yes"<<endl;
           cout<<u<<" "<<v<<endl;
           for(int i=n-u+1;i<=n;i++) cout<<a[i].se<<" ";
           cout<<endl;
           for(int i=n-k+1;i<n-u+1;i++) cout<<a[i].se<<" ";
           return 0;
       }
   }
   cout<<"No";
return 0;
}
/*

*/


#include <bits/stdc++.h>

using namespace std;
typedef pair<int,int> pii;
pii s[300005];
vector<int> v1,v2;
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){cin>>s[i].first;s[i].second=i+1;}
    sort(s,s+n);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].first;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].first;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");
    for(int j=0;j<l;j++)v1.push_back(s[i+j].second);
    for(int j=0;j<l2;j++)v2.push_back(s[i+l+j].second);
    vector<int> ::iterator it;
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for (auto it: v1) cout << it << " ";
        cout << endl;
        for (auto it: v2) cout << it << " ";
        cout << endl;
    }else{
        printf("%d %d\n",l2,l);
        for (auto it: v2) cout << it << " ";
        cout << endl;
        for (auto it: v1) cout << it << " ";
        cout << endl;
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
}s[400005];
bool cmp1(st a,st b){
    return a.v<=b.v?true:false;
}
bool cmp2(st a,st b){
    return a.mark<b.mark?true:false;
}
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n,cmp1);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");

    sort(s+i,s+i+l,cmp2);
    sort(s+i+l,s+i+l+l2,cmp2);
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
    }else{
        printf("%d %d\n",l2,l);
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
}s[300005];
bool cmp1(st a,st b){
    return a.v<=b.v;
}
bool cmp2(st a,st b){
    return a.mark<=b.mark;
}
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n,cmp1);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");

    sort(s+i,s+i+l,cmp2);
    sort(s+i+l,s+i+l+l2,cmp2);
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
    }else{
        printf("%d %d\n",l2,l);
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
    bool operator <(const st b)const{
        return this->v<=b.v;
    }
}s[300010];
vector<int> v1,v2;
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");
    for(int j=0;j<l;j++)v1.push_back(s[i+j].mark);
    for(int j=0;j<l2;j++)v2.push_back(s[i+l+j].mark);
    vector<int> ::iterator it;
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for (auto it: v1) cout << it << " ";
        cout << endl;
        for (auto it: v2) cout << it << " ";
        cout << endl;
    }else{
        printf("%d %d\n",l2,l);
        for (auto it: v2) cout << it << " ";
        cout << endl;
        for (auto it: v1) cout << it << " ";
        cout << endl;
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
}s[300005];
bool cmp1(st a,st b){
        return a.v<b.v;
}
bool cmp2(st a,st b){
    return a.mark<b.mark;
}
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n,cmp1);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");

    sort(s+i,s+i+l,cmp2);
    sort(s+i+l,s+i+l+l2,cmp2);
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
    }else{
        printf("%d %d\n",l2,l);
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
}s[300005];
bool cmp1(st a,st b){
    return a.v<=b.v;
}
bool cmp2(st a,st b){
    return a.mark<=b.mark;
}
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n,cmp1);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");
    sort(s+i,s+i+l,cmp2);
    sort(s+i+l,s+i+l+l2,cmp2);
    if(cnt==1){
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
    }else{
        for(int j=i+l;j<i+l+l2;j++)printf("%d ",s[j].mark);
        puts("");
        for(int j=i;j<i+l;j++)printf("%d ",s[j].mark);
        puts("");
    }
}


#include <bits/stdc++.h>

using namespace std;
struct st{
    int v,mark;
    bool operator <(const st b)const{
        return this->v<=b.v;
    }
}s[300005];
int v1[300005],v2[300005];
int main(){
    int n,x1,x2;
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=0;i<n;i++){scanf("%d",&s[i].v);s[i].mark=i+1;}
    sort(s,s+n);
    int t1,t2,l,l2,i,cnt=0;
    bool fag=false;
    while(cnt<=1){
            cnt++;
        for(i=0;i<n;i++){
            t1=s[i].v;l=(x1+t1-1)/t1;
            if( i+l>=n )continue;
            t2=s[i+l].v;l2=(x2+t2-1)/t2;
            if(i+l+l2>n)continue;
            fag=true;break;
        }
        if(fag)break;
        swap(x1,x2);
    }
    if(!fag){puts("No");return 0;}
    puts("Yes");
    for(int j=0;j<l;j++)v1[j]=s[i+j].mark;
    for(int j=0;j<l2;j++)v2[j]=s[i+l+j].mark;
    sort(v1,v1+l);
    sort(v2,v2+l2);
    if(cnt==1){
            printf("%d %d\n",l,l2);
        for(int j=0;j<l;j++)printf("%d ",v1[j]);
        puts("");
        for(int j=0;j<l2;j++)printf("%d ",v2[j]);
        puts("");
    }else{
        printf("%d %d\n",l2,l);
        for(int j=0;j<l2;j++)printf("%d ",v2[j]);
        puts("");
        for(int j=0;j<l;j++)printf("%d ",v1[j]);
        puts("");
    }
}