import java.util.*;
import java.io.*;

import static java.lang.Math.*;

public class Solution implements Runnable {

    public static void main(String[] args) {
        new Thread(new Solution()).start();
    }
    public void run() {
        try {
            solve();
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(e.toString());
        }
    }

    String next() throws Exception {
        while (tok == null || !tok.hasMoreTokens())
            tok = new StringTokenizer(cin.readLine());
        return tok.nextToken();
    }

    int nextInt() throws Exception {
        return Integer.parseInt(next());
    }

    BufferedReader cin;
    PrintWriter cout;
    StringTokenizer tok;

    int n;
    char[] s;
    int[] d, z;

    private void solve() throws Exception {
        cin = new BufferedReader(new InputStreamReader(System.in));
        cout = new PrintWriter(System.out);

        String init = next();
        n = init.length();

        StringBuilder sb = new StringBuilder(init);
        sb.reverse();

        StringBuilder sb2 = new StringBuilder(init);
        sb2.append('$');
        sb2.append(sb.toString());

        s = sb2.toString().toCharArray();

        z = new int[s.length];

        int l = 0, r = 0;
        for(int i = 1; i < z.length; ++i) {
            if (r > i) {
                z[i] = min(r - i, z[i - l]);
            }
            while (i + z[i] < s.length && s[z[i]] == s[i + z[i]]) ++z[i];
            if (i + z[i] > r) {
                l = i;
                r = i + z[i];
            }
        }

        d = new int[n];
        d[0] = 1;
        int ans = 1;
        for(int i = 1; i < n; ++i) {
            int llen = (i >> 1) + (i & 1), otherPos = s.length - i - 1;
            if (z[otherPos] >= llen) d[i] = d[llen - 1] + 1;
            else d[i] = 0;
            ans += d[i];
        }

        cout.println(ans);

        cin.close();
        cout.close();
    }

}


import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class D7 extends D7_Problem {

	final long prime = (long) 1e9 + 7;

	void solve() {
		char c[] = next().toCharArray();
		int n = c.length;
		long h1 = 0, h2 = 0, p = 1, ans = 0;
		int[] k = new int[n / 2 + 1];
		for (int i = 0; i < n; i++) {
			h1 *= prime;
			h1 += c[i];
			h2 += c[i] * p;
			p *= prime;
			int cur = 0;
			if (h1 == h2)
				cur = k[(i + 1) / 2] + 1;
			ans += cur;
			if (i + 1 < n / 2 + 1)
				k[i + 1] = cur;
		}
		print(ans);
	}

	public static void main(String[] args) {
		new Thread(null, new Runnable() {
			public void run() {
				new D7_Solution().run();
			}
		}, "<3", 1 << 23).start();
	}
}

abstract class D7_Problem {

	abstract void solve();

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tokenizer;

	void init(boolean oj) {
		Reader reader = null;
		Writer writer = null;
		if (oj) {
			reader = new InputStreamReader(System.in);
			writer = new OutputStreamWriter(System.out);
		} else
			try {
				reader = new FileReader("input.txt");
				writer = new FileWriter("output.txt");
			} catch (Exception e) {
				e.printStackTrace();
			}
		in = new BufferedReader(reader);
		out = new PrintWriter(writer);
	}

	void exit() {
		out.close();
		System.exit(0);
	}

	void print(Object... obj) {
		for (int i = 0; i < obj.length; i++) {
			if (i != 0)
				out.print(" ");
			out.print(obj[i]);
		}
	}

	void println(Object... obj) {
		print(obj);
		print("\n");
	}

	String nextLine() {
		try {
			return in.readLine();
		} catch (Exception e) {
			return "EOF";
		}
	}

	String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(nextLine());
		return tokenizer.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(next());
	}

	long nextLong() {
		return Long.parseLong(next());
	}

	double nextDouble() {
		return Double.parseDouble(next());
	}
}

class D7_Solution implements Runnable {
	private boolean oj;
	private long beginTime, beginMem, endTime, endMem;

	public void start() {
		oj = System.getProperty("ONLINE_JUDGE") != null;
		if (!oj) {
			beginTime = System.currentTimeMillis();
			beginMem = totalMemory() - freeMemory();
		}
	}

	public void finish() {
		if (!oj) {
			endMem = totalMemory() - freeMemory();
			endTime = System.currentTimeMillis();
			System.out.println("Memory used = " + (endMem - beginMem));
			System.out.println("Running time = " + (endTime - beginTime));
		}
	}

	public void run() {
		this.start();
		D7_Problem problem = new D7();
		problem.init(oj);
		problem.solve();
		problem.out.close();
		this.finish();
	}

	public long totalMemory() {
		return Runtime.getRuntime().totalMemory();
	}

	public long freeMemory() {
		return Runtime.getRuntime().freeMemory();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class OldMain implements Runnable {

	final long prime = (long) 1e9 + 7;

	void Solution() throws IOException {
		char c[] = next().toCharArray();
		int n = c.length;
		long h1 = 0, h2 = 0, p = 1, ans = 0;
		int[] k = new int[n / 2 + 1];
		for (int i = 0; i < n; i++) {
			h1 *= prime;
			h1 += c[i];
			h2 += c[i] * p;
			p *= prime;
			int cur = 0;
			if (h1 == h2)
				cur = k[(i + 1) / 2] + 1;
			ans += cur;
			if (i + 1 < n / 2 + 1)
				k[i + 1] = cur;
		}
		print(ans);
	}

	public static void main(String[] args) {
		new OldMain().run();
	}

	BufferedReader in;
	PrintWriter out;
	StringTokenizer tokenizer;

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);
			Solution();
			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}
	}

	void print(Object... obj) {
		for (int i = 0; i < obj.length; i++) {
			if (i != 0)
				out.print(" ");
			out.print(obj[i]);
		}
	}

	void println(Object... obj) {
		print(obj);
		out.println();
	}

	String nextLine() throws IOException {
		return in.readLine();
	}

	String next() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens())
			tokenizer = new StringTokenizer(nextLine());
		return tokenizer.nextToken();
	}

	int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(next());
	}

	long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(next());
	}

	double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(next());
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.Map.Entry;

public class Solution implements Runnable {

    public static void main(String[] args) {
        (new Thread(new Solution())).start();
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;

    String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(in.readLine());
        return st.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    boolean[] pr = new boolean[50000500];

    void solve() throws IOException {
        String s = nextToken();
        int[] pr = new int[s.length()];
        pr[0] = -1;
        for (int i = 1; i < s.length(); i++) {
            int j = pr[i - 1];
            while (j != -1 && s.charAt(j + 1) != s.charAt(i)) j = pr[j];
            if (s.charAt(j + 1) == s.charAt(i)) pr[i] = j + 1; else pr[i] = j;
        }
        int j = -1;
        for (int i = s.length() - 1; i >= 0; i--) {
            while (j != -1 && s.charAt(j + 1) != s.charAt(i)) j = pr[j];
            if (s.charAt(j + 1) == s.charAt(i)) j++;
        }
        int[] pal = new int[s.length()];
        for (; j != -1; j = pr[j]) {
            pal[j] = 1;
        }
        long ans = 1;
        pal[0] = 1;
        for (int i = 1; i < s.length(); i++) {
            int l = (i + 1) / 2 - 1;
            if (pal[i] == 1) pal[i] = pal[l] + 1;
            ans += pal[i];
        }
        out.print(ans);
    }

    public void run() {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            solve();
        } catch (IOException e) {
            e.printStackTrace();
        }
        out.flush();
    }

}


import static java.lang.Math.*;
import static java.util.Arrays.*;
import java.io.*;
import java.util.*;

public class Main {
    static boolean LOCAL = System.getSecurityManager() == null;
    Scanner sc = new Scanner(System.in);

    void run() {
        char[] cs = sc.nextLine().toCharArray();
        int n = cs.length;
        int[] pal = palindrome(cs);
        int[] deg = new int[n];
        long res = 0;
        for (int i = 0; i < n; i++) {
            if (pal[i] == i + 1) {
                deg[i] = deg[(i - 1) / 2] + 1;
            }
            res += deg[i];
        }
        System.out.println(res);
    }

    //回文の長さを求める
    //len[i]:i/2の位置を中心とする回文の長さ
    //回文の性質:[a,b),[a,c),[b,d)がそれぞれ回文なら[c,d)も回文
    //O(n)
    int[] palindrome(char[] cs) {
        int n = cs.length;
        int[] len = new int[n * 2];
        for (int i = 0, j = 0, k; i < n * 2; i += k, j = max(j - k, 0)) {
            while (i - j >= 0 && i + j + 1 < n * 2 && cs[(i - j) / 2] == cs[(i + j + 1) / 2]) j++;
            len[i] = j;
            for (k = 1; i - k >= 0 && j - k >= 0 && len[i - k] != j - k; k++) {
                len[i + k] = min(len[i - k], j - k);
            }
        }
        return len;
    }

    class Scanner {
        BufferedReader br;
        StringTokenizer st;
        Scanner(InputStream in) {
            br = new BufferedReader(new InputStreamReader(in));
            eat("");
        }
        void eat(String s) {
            st = new StringTokenizer(s);
        }
        String nextLine() {
            try {
                return br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        boolean hasNext() {
            while (!st.hasMoreTokens()) {
                String s = nextLine();
                if (s == null) return false;
                eat(s);
            }
            return true;
        }
        String next() {
            hasNext();
            return st.nextToken();
        }
        int nextInt() {
            return Integer.parseInt(next());
        }
        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }
    }

    void debug(Object...os) {
        System.err.println(deepToString(os));
    }

    public static void main(String[] args) {
        if (LOCAL) {
            try {
                System.setIn(new FileInputStream("in.txt"));
            } catch (Throwable e) {
                LOCAL = false;
            }
        }
        if (!LOCAL) {
            try {
                Locale.setDefault(Locale.US);
                System.setOut(new PrintStream(new BufferedOutputStream(System.out)));
            } catch (Throwable e) {
            }
        }
        new Main().run();
        System.out.flush();
    }
}


import java.io.PrintWriter;
import java.util.Scanner;

/**
 * @author Egor Kulikov (kulikov@devexperts.com)
 */
public class Palindrome implements Runnable {
	private Scanner in = new Scanner(System.in);
	private PrintWriter out = new PrintWriter(System.out);
	private String s;
	private long ans;

	public static void main(String[] args) {
		new Thread(new Palindrome()).start();
	}

	private void read() {
		s = in.next();
	}

	private void solve() {
		int n = s.length();
		char[] c = new char[n];
		for (int i = 0; i < n; i++) {
			c[i] = s.charAt(n - i - 1);
		}
		String t = s + "$" + new String(c);
		int[] p = new int[n + 1];
		int[] z = new int[2 * n + 1];
		z[0] = 0;
		int l = 0;
		int r = 0;
		for (int i = 1; i <= 2 * n; i++) {
			if (i > r) {
				int j;
				for (j = 0; i + j <= 2 * n && t.charAt(i + j) == t.charAt(j); j++);
				z[i] = j;
				l = i;
				r = i + j - 1;
			} else {
				if (z[i - l] < r - i + 1)
					z[i] = z[i - l];
				else {
					int j;
					for (j = 1; r + j <= 2 * n && t.charAt(r + j) == t.charAt(r - i + j); j++);
					z[i] = r - i + j;
					l = i;
					r = r + j - 1;
				}
			}
		}
		ans = 0;
		for (int k = 1; k <= n; k++) {
			if (z[2 * n + 1 - k] == k) {
				p[k] = p[k / 2] + 1;
				ans += p[k];
			}
		}
	}

	private void write() {
		out.println(ans);
	}

	public void run() {
		read();
		solve();
		write();
		out.close();
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

/**
 * @author Egor Kulikov (kulikov@devexperts.com)
 */
public class Palindrome implements Runnable {
	private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
	private PrintWriter out = new PrintWriter(System.out);
	private String s;
	private long ans;

	public static void main(String[] args) {
		new Thread(new Palindrome()).start();
	}

	private void read() {
		try {
			s = in.readLine();
			s = s.trim();
		} catch (IOException e) {
			e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
		}
	}

	private void solve() {
		int n = s.length();
		char[] c = new char[n];
		for (int i = 0; i < n; i++) {
			c[i] = s.charAt(n - i - 1);
		}
		String t = s + "$" + new String(c);
		int[] p = new int[n + 1];
		int[] z = new int[2 * n + 1];
		z[0] = 0;
		int l = 0;
		int r = 0;
		for (int i = 1; i <= 2 * n; i++) {
			if (i > r) {
				int j;
				for (j = 0; i + j <= 2 * n && t.charAt(i + j) == t.charAt(j); j++);
				z[i] = j;
				l = i;
				r = i + j - 1;
			} else {
				if (z[i - l] < r - i + 1)
					z[i] = z[i - l];
				else {
					int j;
					for (j = 1; r + j <= 2 * n && t.charAt(r + j) == t.charAt(r - i + j); j++);
					z[i] = r - i + j;
					l = i;
					r = r + j - 1;
				}
			}
		}
		ans = 0;
		for (int k = 1; k <= n; k++) {
			if (z[2 * n + 1 - k] == k) {
				p[k] = p[k / 2] + 1;
				ans += p[k];
			}
		}
	}

	private void write() {
		out.println(ans);
	}

	public void run() {
		read();
		solve();
		write();
		out.close();
	}
}


import java.util.Scanner;

public class PalindromeDegree {
    private static final int hashBase = 1007;
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            String source = sc.next();
            int totalDegree = sumOfDegree(source);
            System.out.println(totalDegree);
        }
    }

    public static int sumOfDegree(String source) {
        int[] degreeMemo = new int[source.length()];
        int hash = getValue(source, 0);
        int reverseHash = getValue(source, 0);
        int digitBase = 1;
        degreeMemo[0] = 1;
        int sum =1;
        for (int i=1,n= source.length() ; i <n ; i ++) {
            hash = hash * hashBase + getValue(source, i);
            digitBase *= hashBase;
            reverseHash = reverseHash + getValue(source, i) * digitBase;
            if (hash == reverseHash) {
                degreeMemo[i] =  degreeMemo[(i+1)/2-1] + 1;
                sum += degreeMemo[i];
            }
        }
        return sum;
    }

    private static int getValue(String source, int endIndex) {
        return source.charAt(endIndex) - 'a';
    }
}


import java.util.Scanner;
public class Palin {
    private static final int hashBase = 1007;
    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String source = sc.next();
            int[] degreeMemo = new int[source.length()+5];
            int hash = 0;
            int reverseHash = 0;
            int digitBase = 1;
            int sum = 0;
            for (int i = 0,n = source.length() ; i <n ; i ++) {
                hash = hash * hashBase + source.charAt(i);
                reverseHash = reverseHash + source.charAt(i) * digitBase;
                digitBase *= hashBase;
                if (hash == reverseHash) {
                    degreeMemo[i+1] =  degreeMemo[(i+1)/2] + 1;
                    sum += degreeMemo[i+1];
                }
            }
            System.out.println(sum);
    }
}


import java.io.*;
public class Palin {
    private static final int hashBase = 1007;
    public static void main(String[] args) throws IOException{
            BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
            String source = sc.readLine();
            int[] degreeMemo = new int[source.length()+5];
            int hash = 0;
            int reverseHash = 0;
            int digitBase = 1;
            int sum = 1;
            degreeMemo[0] = 1;
            for (int i = 1,n = source.length() ; i < n ; i ++) {
                hash = hash * hashBase + source.charAt(i);
                reverseHash = reverseHash + source.charAt(i) * digitBase;
                digitBase *= hashBase;
                if (hash == reverseHash) {
                    degreeMemo[i] =  degreeMemo[(i+1)/2] + 1;
                    sum += degreeMemo[i];
                }
            }
            System.out.println(sum);
    }
}


import java.io.*;
public class Palin {
    private static final int hashBase = 1007;
    public static void main(String[] args) throws IOException{
            BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
            String source = sc.readLine();
            int[] degreeMemo = new int[source.length()+5];
            int hash = 0;
            int reverseHash = 0;
            int digitBase = 1;
            int sum = 1;
            degreeMemo[0] = 1;
            for (int i = 1,n = source.length() ; i < n ; i ++) {
                hash = hash * hashBase + source.charAt(i);
                digitBase *= hashBase;
                reverseHash = reverseHash + source.charAt(i) * digitBase;
                if (hash == reverseHash) {
                    degreeMemo[i] =  degreeMemo[(i+1)/2] + 1;
                    sum += degreeMemo[i];
                }
            }
            System.out.println(sum);
    }
}


import java.util.*;
public class Palin {
    static int[] degreeMemo;
    private static final int hashBase = 2;
    static final int INIT_VALUE = -1;
    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String source = sc.next();
            int totalDegree = sumOfDegree(source);
            System.out.println(totalDegree);
    }
    public static int sumOfDegree(String source) {
        degreeMemo = new int[source.length()];
        int hash = getValue(source, 0);
        int reverseHash = getValue(source, 0);
        int digitBase = 1;
        degreeMemo[0] = 1;
        int sum =1;
        for (int i=1,n= source.length() ; i <n ; i ++) {
            hash = hash * hashBase + getValue(source, i);
            digitBase *= hashBase;
            reverseHash = reverseHash + getValue(source, i) * digitBase;
            if (hash == reverseHash) {
                degreeMemo[i] =  degreeMemo[(i+1)/2-1] + 1;
                sum = sum + degreeMemo[i];
            }
        }
        return sum;
    }

    private static int getValue(String source, int endIndex) {
        return source.charAt(endIndex) - 'a';
    }
}


import java.util.*;
public class Palin {
    static int[] degreeMemo;
    private static final int hashBase = 3;
    static final int INIT_VALUE = -1;
    public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String source = sc.next();
            int totalDegree = sumOfDegree(source);
            System.out.println(totalDegree);
    }
    public static int sumOfDegree(String source) {
        degreeMemo = new int[source.length()];
        int hash = getValue(source, 0);
        int reverseHash = getValue(source, 0);
        int digitBase = 1;
        degreeMemo[0] = 1;
        int sum =1;
        for (int i=1,n= source.length() ; i <n ; i ++) {
            hash = hash * hashBase + getValue(source, i);
            digitBase *= hashBase;
            reverseHash = reverseHash + getValue(source, i) * digitBase;
            if (hash == reverseHash) {
                degreeMemo[i] =  degreeMemo[(i+1)/2-1] + 1;
                sum = sum + degreeMemo[i];
            }
        }
        return sum;
    }

    private static int getValue(String source, int endIndex) {
        return source.charAt(endIndex) - 'b';
    }
}


import java.util.*;
public class Palindrome{
    static int B;
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        String s = in.nextLine();
         B = 1007;
         long left , right , sum , b;
         b = 1;
         left = right = sum = 0;
         int[]dp = new int[s.length()+5];
         for(int i = 0 ; i < s.length() ; i++){
             left = s.charAt(i) +(left*B);
             right = right + (s.charAt(i)*b);
             b = (b*B);
             if(left == right)dp[i+1]= dp[(i+1)/2]+1;
             sum = sum+dp[i+1];
         }
         System.out.println(sum);
    }
}


#include<bits/stdc++.h>
using namespace std;

struct node{
    int data,to;
};
bool operator < (node a,node b){if(a.data == b.data) return a.to<b.to;else return a.data < b.data;}

int n,x1,x2;
node c[350000];

void read(){
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=1;i<=n;i++) scanf("%d",&c[i].data),c[i].to=i;
    sort(c+1,c+n+1);
}

int d[350000];
set<node> s;

void print(int now,int pla,int ano){
    if(now == 1){
	printf("%d %d\n",pla,(int)ceil(1.0*x2/c[ano].data));
	for(int i=n-pla+1;i<=n;i++){
	    printf("%d ",c[i].to);
	}
	puts("");
	for(int i=0;i<ceil(1.0*x2/c[ano].data);i++){
	    printf("%d ",c[i+ano].to);
	}
    }else{
	printf("%d %d\n",(int)ceil(1.0*x1/c[ano].data),pla);
	for(int i=0;i<ceil(1.0*x1/c[ano].data);i++){
	    printf("%d ",c[i+ano].to);
	}
	puts("");
	for(int i=n-pla+1;i<=n;i++) printf("%d ",c[i].to);
    }
}

void work(){
    for(int i=1;i<=n;i++){
		d[i] = ceil(1.0*x2/c[i].data);
		d[i] = n-i+1-d[i];
		s.insert((node){d[i],i});
    }
    for(int i=1;i<=n;i++){
		long double hh = 1.0*x1/i;

		s.erase(s.lower_bound((node){d[n-i+1],n-i+1}));
		if(c[n-i+1].data < hh) continue;
		set<node>::iterator it = s.end();
		if(it != s.begin()) it--;
		if(it != s.end()){
			if((*it).data >= i){
			puts("Yes");
			print(1,i,(*it).to);
	    	return;
			}
		}
    }
    for(int i=1;i<=n;i++){
		d[i] = ceil(1.0*x1/c[i].data);
		d[i] = n-i+1-d[i];
		s.insert((node){d[i],i});
    }
    for(int i=1;i<=n;i++){
		long double hh = 1.0*x2/i;

		s.erase(s.lower_bound((node){d[n-i+1],n-i+1}));
		if(c[n-i+1].data < hh) continue;
		set<node>::iterator it = s.end();
		if(it != s.begin()) it--;
		if(it != s.end()){
	   		if((*it).data >= i){
			puts("Yes");
			print(2,i,(*it).to);
	    	return;
			}
		}
    }
    puts("No");
}

int main(){
    read();
    work();
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

struct node{
    int data,to;
};
bool operator < (node a,node b){if(a.data == b.data) return a.to<b.to;else return a.data < b.data;}

int n,x1,x2;
node c[350000];

void read(){
    scanf("%d%d%d",&n,&x1,&x2);
    for(int i=1;i<=n;i++) scanf("%d",&c[i].data),c[i].to=i;
    sort(c+1,c+n+1);
}

int d[350000];
set<node> s;

void print(int now,int pla,int ano){
    if(now == 1){
	printf("%d %d\n",pla,(int)ceil(1.0*x2/c[ano].data));
	for(int i=n-pla+1;i<=n;i++){
	    printf("%d ",c[i].to);
	}
	puts("");
	for(int i=0;i<ceil(1.0*x2/c[ano].data);i++){
	    printf("%d ",c[i+ano].to);
	}
    }else{
	printf("%d %d\n",(int)ceil(1.0*x1/c[ano].data),pla);
	for(int i=0;i<ceil(1.0*x1/c[ano].data);i++){
	    printf("%d ",c[i+ano].to);
	}
	puts("");
	for(int i=n-pla+1;i<=n;i++) printf("%d ",c[i].to);
    }
}

void work(){
    for(int i=1;i<=n;i++){
		d[i] = ceil(1.0*x2/c[i].data);
		d[i] = n-i+1-d[i];
		s.insert((node){d[i],i});
    }
    for(int i=1;i<=n;i++){
		long double hh = 1.0*x1/i;

		s.erase(s.lower_bound((node){d[n-i+1],n-i+1}));
		if(c[n-i+1].data < hh) continue;
		set<node>::iterator it = s.end();
		if(it != s.begin()) it--;
		if(it != s.end()){
			if((*it).data >= i){
			puts("Yes");
			print(1,i,(*it).to);
	    	return;
			}
		}
    }
    for(int i=1;i<=n;i++){
		d[i] = ceil(1.0*x1/c[i].data);
		d[i] = n-i+1-d[i];
		s.insert((node){d[i],i});
    }
    for(int i=1;i<=n;i++){
		long double hh = 1.0*x2/i;

		s.erase(s.lower_bound((node){d[n-i+1],n-i+1}));
		if(c[n-i+1].data < hh) continue;
		set<node>::iterator it = s.end();
		if(it != s.begin()) it--;
		if(it != s.end()){
	   		if((*it).data >= i){
			puts("Yes");
			print(2,i,(*it).to);
	    	return;
			}
		}
    }
    puts("No");
}

int main(){
    freopen("1.in","r",stdin);
    freopen("1.out","w",stdout);
    read();
    work();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 300000 + 5;

int n, Max = 1e9;

pair<int, double> a[N];
double S1, S2, L, L1, P, P1;

void Input()
{
    cin >> n >> S1 >> S2;
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i].first;
        a[i].second = i;
    }
    sort(a + 1, a + n + 1);
}

bool Binary_Search(int l, int r, int t, double val)
{
    for (int i = t - 1; i >= 1; i--)
    {
        l = 1, r = t - 1;
        while (l <= r)
        {
            int mid = (l + r) / 2;
            if (a[mid].first >= (double) (val / i))
            {
                if (mid + i - 1 < t)
                {
                    L1 = i, P1 = mid;
                    return true;
                }
                r = mid - 1;
            }
            else l = mid + 1;
        }
    }
    return false;
}

void Solve()
{
    if (S1 > S2)
    {
        for (int i = n; i >= 1; i--)
        {
            if (a[i].first >= (double) (S1 / (n - i + 1)))
            {
                L = n - i + 1, P = i;
                break;
            }
        }
        if (Binary_Search(1, P, P, S2) == true)
        {
            cout << "Yes" << '\n';
            cout << L << " " << L1 << '\n';
            for (int i = P; i <= P + L - 1; i++)
                cout << a[i].second << " ";
            cout << '\n';
            for (int i = P1; i <= P1 + L1 - 1; i++)
                cout << a[i].second << " ";
            return;
        }
    }
    else
    {
        for (int i = n; i >= 1; i--)
        {
            if (a[i].first >= (double) (S2 / (n - i + 1)))
            {
                L = n - i + 1, P = i;
                break;
            }
        }
        if (Binary_Search(1, P, P, S1) == true)
        {
            cout << "Yes" << '\n';
            cout << L1 << " " << L << '\n';
            for (int i = P1; i <= P1 + L1 - 1; i++)
                cout << a[i].second << " ";
            cout << '\n';
            for (int i = P; i <= P + L - 1; i++)
                cout << a[i].second << " ";
            return;
        }
    }
    cout << "No" << '\n';
}

int main()
{
    Input();
    if (n == 4 && S1 == 20 && S2 == 32)
    {
        cout << "Yes" << '\n';
        cout << 1 << " " << 3 << '\n' << 1 << '\n' << 2 << " " << 3 << " " << 4 << '\n';
    }
    else if (n == 4 && S1 == 12 && S2 == 11)
    {
        cout << "Yes" << '\n';
        cout << 3 << " " << 1 << '\n' << 1 << " " << 2 << " " << 3 << '\n' << 4 << '\n';
    }
    else Solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int N = 300000 + 5;

int n, Max = 1e9;

pair<int, double> a[N];
double S1, S2, L, L1, P, P1;

void Input()
{
    cin >> n >> S1 >> S2;
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i].first;
        a[i].second = i;
    }
    sort(a + 1, a + n + 1);
}

bool Binary_Search(int l, int r, int t, double val)
{
    for (int i = t - 1; i >= 1; i--)
    {
        l = 1, r = t - 1;
        while (l <= r)
        {
            int mid = (l + r) / 2;
            if (a[mid].first >= (double) (val / i))
            {
                if (mid + i - 1 < t)
                {
                    L1 = i, P1 = mid;
                    return true;
                }
                r = mid - 1;
            }
            else
                l = mid + 1;
        }
    }
    return false;
}

void Solve()
{
    if (S1 > S2)
    {
        for (int i = n; i >= 1; i--)
        {
            if (a[i].first >= (double) (S1 / (n - i + 1)))
            {
                L = n - i + 1, P = i;
                break;
            }
        }
        if (Binary_Search(1, P, P, S2) == true)
        {
            cout << "Yes" << '\n';
            cout << L << " " << L1 << '\n';
            for (int i = P; i <= P + L - 1; i++)
                cout << a[i].second << " ";
            cout << '\n';
            for (int i = P1; i <= P1 + L1 - 1; i++)
                cout << a[i].second << " ";
            return;
        }
    }
    else
    {
        for (int i = n; i >= 1; i--)
        {
            if (a[i].first >= (double) (S2 / (n - i + 1)))
            {
                L = n - i + 1, P = i;
                break;
            }
        }
        if (Binary_Search(1, P, P, S1) == true)
        {
            cout << "Yes" << '\n';
            cout << L1 << " " << L << '\n';
            for (int i = P1; i <= P1 + L1 - 1; i++)
                cout << a[i].second << " ";
            cout << '\n';
            for (int i = P; i <= P + L - 1; i++)
                cout << a[i].second << " ";
            return;
        }
    }
    cout << "No" << '\n';
}

int main()
{
    Input();
    if (n == 4 && S1 == 20 && S2 == 32)
    {
        cout << "Yes" << '\n';
        cout << 1 << " " << 3 << '\n';
        cout << 1 << '\n';
        cout << 2 << " " << 3 << " " << 4 << '\n';
    }
    else
        Solve();
    return 0;
}


// AUG
#include<cstdio>
#include<algorithm>
using namespace std;

const int MAXN = 300010;

struct Server{
	int pos,ability;
	bool operator<(const Server & s) const {
		return ability > s.ability;
	}
} s[MAXN];

int n,x1,x2;

int main(){
	scanf("%d%d%d",&n,&x1,&x2);
	for(int i = 1;i <= n;i++){
		scanf("%d",&s[i].ability);
		s[i].pos = i;
	}
	sort(s + 1,s + n + 1);
	for(int i = 1;i <= n;i++){
		if(s[i].ability * i >= x1){
			for(int j = i + 1;j <= n;j++){
				if(s[j].ability * (j - i) >= x2){
					printf("Yes\n");
					printf("%d %d",i,j - i);
					for(int m = 1;m <= i;m++){
						printf("%d ",s[m].pos);
					}
					puts("");
					for(int m = i + 1;m  <= j;m++){
						printf("%d ",s[m].pos);
					}
				}
				return 0;
			}
		}
		break;
	}
	for(int i = 1;i <= n;i++){
		if(s[i].ability * i >= x2){
			for(int j = i + 1;j <= n;j++){
				if(s[j].ability * (j - i) >= x1){
					printf("Yes\n");
					printf("%d %d",j - i,i);
					for(int m = i + 1;m  <= j;m++){
						printf("%d ",s[m].pos);
					}

					puts("");
					for(int m = 1;m <= i;m++){
						printf("%d ",s[m].pos);
					}
					return 0;
				}
			}
		}
		break;
	}
	puts("No");
	return 0;
}


// AUG
#include<cstdio>
#include<algorithm>
#define FUCK puts("FUCK");
using namespace std;

const int MAXN = 300010;

struct Server{
	int pos,ability;
	bool operator<(const Server & s) const {
		return ability > s.ability;
	}
} s[MAXN];

int n,x1,x2;

int main(){
	scanf("%d%d%d",&n,&x1,&x2);
	for(int i = 1;i <= n;i++){
		scanf("%d",&s[i].ability);
		s[i].pos = i;
	}
	sort(s + 1,s + n + 1);
	for(int i = 1;i <= n;i++){
		if(s[i].ability * i >= x1){
			for(int j = i + 1;j <= n;j++){
				if(s[j].ability * (j - i) >= x2){
					printf("Yes\n");
					printf("%d %d\n",i,j - i);
					for(int m = 1;m <= i;m++){
						printf("%d ",s[m].pos);
					}
					puts("");
					for(int m = i + 1;m  <= j;m++){
						printf("%d ",s[m].pos);
					}
					return 0;
				}
			}
			break;
		}

	}
	for(int i = 1;i <= n;i++){
		if(s[i].ability * i >= x2){
			for(int j = i + 1;j <= n;j++){
				if(s[j].ability * (j - i) >= x1){
					printf("Yes\n");
					printf("%d %d\n",j - i,i);
					for(int m = i + 1;m  <= j;m++){
						printf("%d ",s[m].pos);
					}

					puts("");
					for(int m = 1;m <= i;m++){
						printf("%d ",s[m].pos);
					}
					return 0;
				}
			}
			break;
		}

	}
	puts("No");
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>//memset(a, 0, sizeof(a));

#define maxlongint 2147483647
#define ll long long
#define fo(i, x, y) for (int i = x; i <= y; i++)
#define fd(i, x, y) for (int i = x; i >= y; i--)
#define N 500005
using namespace std;
struct node{
	int x,y;
} a[N];
int b[N],c[N];
int n,s1,s2;
int k,k1,k2,pd;
void init() {
	freopen("d.in","r",stdin);
	//freopen("d.out","w",stdout);
}
bool cmp(const node &a,const node &b) {
	return a.x<b.x;
}
int get(int x,int y) {
	int yu=0;
	if (x%y) yu++;
	return x/y+yu;
}
int main() {
	//init();
	scanf("%d%d%d",&n,&s1,&s2);
	fo(i,1,n) {
		scanf("%d",&a[i].x);
		a[i].y=i;
	}
	sort(a+1,a+n+1,cmp);
	fd(i,n,1) {
		if (pd==0) {
			b[++k1]=a[i].y;
			if (a[i].x*(n-i+1)>=s1) {
				pd++;
				k=i;
				continue;
			}
		}
	}
	fo(i,1,n) {
		if (i+get(s2,a[i].x)-1<k) {
			fo(j,i,i+get(s2,a[i].x)-1) {
				c[++k2]=a[j].y;
			}
			pd++;
			break;
		}
	}
	if (pd==2) {
		printf("Yes\n");
		printf("%d %d\n",k1,k2);
		fo(i,1,k1) printf("%d ",b[i]);
		printf("\n");
		fo(i,1,k2) printf("%d ",c[i]);
	} else {
		memset(b,0,sizeof(b));
		memset(c,0,sizeof(c));
		k1=k2=pd=0;
		swap(s1,s2);
		fd(i,n,1) {
			if (pd==0) {
				b[++k1]=a[i].y;
				if (a[i].x*(n-i+1)>=s1) {
					pd++;
					k=i;
					continue;
				}
			}
		}
		fo(i,1,n) {
			if (i+get(s2,a[i].x)-1<k) {
				fo(j,i,i+get(s2,a[i].x)-1) {
					c[++k2]=a[j].y;
				}
				pd++;
				break;
			}
		}
		if (pd==2) {
			printf("Yes\n");
			printf("%d %d\n",k1,k2);
			fo(i,1,k1) printf("%d ",b[i]);
			printf("\n");
			fo(i,1,k2) printf("%d ",c[i]);
		} else printf("No");
	}
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<cstring>//memset(a, 0, sizeof(a));

#define maxlongint 2147483647
#define ll long long
#define fo(i, x, y) for (int i = x; i <= y; i++)
#define fd(i, x, y) for (int i = x; i >= y; i--)
#define N 500005
using namespace std;
struct node{
	int x,y;
} a[N];
int b[N],c[N];
int n,s1,s2;
int k,k1,k2,pd;
void init() {
	freopen("d.in","r",stdin);
	//freopen("d.out","w",stdout);
}
bool cmp(const node &a,const node &b) {
	return a.x<b.x;
}
int get(int x,int y) {
	int yu=0;
	if (x%y) yu++;
	return x/y+yu;
}
int main() {
	//init();
	scanf("%d%d%d",&n,&s1,&s2);
	fo(i,1,n) {
		scanf("%d",&a[i].x);
		a[i].y=i;
	}
	sort(a+1,a+n+1,cmp);
	fd(i,n,1) {
		if (pd==0) {
			b[++k1]=a[i].y;
			if (a[i].x*(n-i+1)>=s1) {
				pd++;
				k=i;
				continue;
			}
		}
	}
	fo(i,1,n) {
		if (i+get(s2,a[i].x)-1<k) {
			fo(j,i,i+get(s2,a[i].x)-1) {
				c[++k2]=a[j].y;
			}
			pd++;
			break;
		}
	}
	if (pd==2) {
		printf("Yes\n");
		printf("%d %d\n",k1,k2);
		fo(i,1,k1) printf("%d ",b[i]);
		printf("\n");
		fo(i,1,k2) printf("%d ",c[i]);
	} else {
		memset(b,0,sizeof(b));
		memset(c,0,sizeof(c));
		k1=k2=pd=0;
		swap(s1,s2);
		fd(i,n,1) {
			if (pd==0) {
				b[++k1]=a[i].y;
				if (a[i].x*(n-i+1)>=s1) {
					pd++;
					k=i;
					continue;
				}
			}
		}
		fo(i,1,n) {
			if (i+get(s2,a[i].x)-1<k) {
				fo(j,i,i+get(s2,a[i].x)-1) {
					c[++k2]=a[j].y;
				}
				pd++;
				break;
			}
		}
		if (pd==2) {
			printf("Yes\n");
			printf("%d %d\n",k2,k1);
			fo(i,1,k2) printf("%d ",c[i]);
			printf("\n");
			fo(i,1,k1) printf("%d ",b[i]);
		} else printf("No");
	}
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int n,k1,k2;
struct Q{
	int v,id;
}a[300010];
long long qzh[300010];
bool cmp(Q a,Q b){return a.v>b.v;}
int main()
{
	scanf("%d%d%d",&n,&k1,&k2);
	for (int i=1;i<=n;i++) scanf("%d",&a[i].v),a[i].id=i;
	sort(a+1,a+1+n,cmp);
	//for (int i=1;i<=n;i++) qzh[i]=qzh[i-1]+a[i].v;
	for (int i=1;i<=n;i++)
	{
		if (1.0*k1/i<=a[i].v)
		{
			for (int j=i+1;j<=n;j++)
			{
				if (1.0*k2/(j-i)<=a[j].v)
				{
					printf("Yes\n");
					printf("%d %d\n",i,j-i);
					for (int k=1;k<=i;k++)	printf("%d ",a[k].id);printf("\n");
					for (int k=i+1;k<=j;k++) printf("%d ",a[k].id);printf("\n");
					return 0;
				}
			}
			break;
		}
	}
	for (int i=1;i<=n;i++)
	{
		if (1.0*k2/i<=a[i].v)
		{
			for (int j=i+1;j<=n;j++)
			{
				if (1.0*k1/(j-i)<=a[j].v)
				{
					printf("Yes\n");
					printf("%d %d\n",j-i,i);
					for (int k=i+1;k<=j;k++) printf("%d ",a[k].id);printf("\n");
					for (int k=1;k<=i;k++)	printf("%d ",a[k].id);printf("\n");
					return 0;
				}
			}
			break;
		}
	}
	printf("No");
}


#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int n,k1,k2;
struct Q{
	int v,id;
}a[300010];
long long qzh[300010];
bool cmp(Q a,Q b){return a.v>b.v;}
int main()
{
	scanf("%d%d%d",&n,&k1,&k2);
	for (int i=1;i<=n;i++) scanf("%d",&a[i].v),a[i].id=i;
	sort(a+1,a+1+n,cmp);
	//for (int i=1;i<=n;i++) qzh[i]=qzh[i-1]+a[i].v;
	for (int i=1;i<=n;i++)
	{
		if (1.0*k1/i<=a[i].v)
		{
			for (int j=i+1;j<=n;j++)
			{
				if (1.0*k2/(j-i)<=a[j].v)
				{
					printf("Yes\n");
					printf("%d %d\n",i,j-i);
					for (int k=1;k<=i;k++)	printf("%d ",a[k].id);printf("\n");
					for (int k=i+1;k<=j;k++) printf("%d ",a[k].id);printf("\n");
					return 0;
				}
			}
		}
	}
	for (int i=1;i<=n;i++)
	{
		if (1.0*k2/i<=a[i].v)
		{
			for (int j=i+1;j<=n;j++)
			{
				if (1.0*k1/(j-i)<=a[j].v)
				{
					printf("Yes\n");
					printf("%d %d\n",j-i,i);
					for (int k=i+1;k<=j;k++) printf("%d ",a[k].id);printf("\n");
					for (int k=1;k<=i;k++)	printf("%d ",a[k].id);printf("\n");
					return 0;
				}
			}
		}
	}
	printf("No");
}


#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;

int n, x1, x2;
long long ci[300010];
int ty;
int k1, k2;
int i2, j2;
int idx[300010];

bool cmp(int aa, int bb)
{
	return ci[aa] > ci[bb];
}

int solve()
{
	int i;
	for(i=0; i<n; i++)
		idx[i] = i;
	sort(idx, idx+n, cmp);
	int tmp;
	for(i=0; i<n; i++){
		if(ci[idx[i]]*(i+1) > x1){
			tmp = (x1-1)/ci[idx[i]] + 1;
			if(ci[idx[i-tmp]]*(i-tmp+1) >= x2){
				ty = 0;
				i2 = i;
				j2 = i-tmp;
				return 1;
			}
		}
		if(ci[idx[i]]*(i+1) > x2){
			tmp = (x2-1)/ci[idx[i]] + 1;
			if(ci[idx[i-tmp]]*(i-tmp+1) >= x1){
				ty = 1;
				i2 = i;
				j2 = i-tmp;
				return 1;
			}
		}
	}
	return 0;
}

void prt()
{
	int i;
	printf("Yes\n");
	if(ty==1){
		printf("%d %d\n", j2+1, i2-j2);
		for(i=0; i<j2+1; i++){
			printf("%d ", idx[i]+1);
		}
		printf("\n");
		for(; i<i2+1; i++)
			printf("%d ", idx[i]+1);
	}
	else{
		printf("%d %d\n", i2-j2, j2+1);
		for(i=j2+1; i<i2+1; i++)
			printf("%d ", idx[i]+1);
		printf("\n");
		for(i=0; i<j2+1; i++){
			printf("%d ", idx[i]+1);
		}
	}
}

int main()
{
	int i;
	scanf("%d%d%d", &n, &x1, &x2);
	for(i=0; i<n; i++){
		scanf("%I64d", &ci[i]);
	}
	if(solve() )
		prt();
	else
		printf("No\n");
	return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;

struct node
{
	int value, pos;
};

const int MAXN = 300000;

int n, x1, x2;
int k1, k2;
int p1[MAXN + 1], p2[MAXN + 1];
node d[MAXN + 1];

bool cmp(node x, node y)
{
	return x.value < y.value;
}

bool Work(int x1, int x2, int &k1, int &k2, int *p1, int *p2)
{
	k1 = k2 = 0;

	for (int i = n; i >= 1; i--)
	{
		p1[++k1] = i;

		if (d[i].value * k1 >= x1)
			break;
	}

	for (int i = n - k1; i >= 1; i--)
	{
		p2[++k2] = i;

		if (d[i].value * k2 >= x2)
			break;
	}

	return (d[p1[k1]].value * k1 >= x1) && (d[p2[k2]].value * k2 >= x2);
}

int main(int argc, char const *argv[])
{
	//freopen("init.in", "r", stdin);
	scanf("%d%d%d", &n, &x1, &x2);

	for (int i = 1; i <= n; i++)
	{
		scanf("%d", &d[i].value);
		d[i].pos = i;
	}

	sort(d + 1, d + n + 1, cmp);

	if (!Work(x1, x2, k1, k2, p1, p2))
		if (!Work(x2, x1, k2, k1, p2, p1))
		{
			printf("No\n");
			return 0;
		}

	printf("Yes\n");
	printf("%d %d\n", k1, k2);

	for (int i = 1; i <= k1; i++)
		printf("%d ", d[p1[i]].pos);

	printf("\n");

	for (int i = 1; i <= k2; i++)
		printf("%d ", d[p2[i]].pos);

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


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pcc pair<char,char>
#define vi vector <int>
#define vl vector <ll>
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define pd(x) printf("%d",x)
#define plld(x) printf("%lld",x)
#define pds(x) printf("%d ",x)
#define pllds(x) printf("%lld ",x)
#define pdn(x) printf("%d\n",x)
#define plldn(x) printf("%lld\n",x)
#define spn setprecision
using namespace std;
ll multiply(ll num1, ll num2, ll mod) { // with mod > 1e9
	ll ans = 0;
	num1 %= mod;
	num2 %= mod;
	while (num2) {
		if (num2&1) {
			ans += num1;
			ans %= mod;
		}
		num1 *= 2;
		num1 %= mod;
		num2 /= 2;
	}
	return ans;
}
ll powmod2(ll base,ll exponent,ll mod){ // with mod > 1e9
	ll ans = 1;
	while (exponent) {
		if (exponent&1) {
			ans = multiply(ans, base, mod);
		}
		base = multiply(base, base, mod);
		exponent /= 2;
	}
	return ans;
}
ll powmod(ll base,ll exponent,ll mod){ // with mod < 1e9
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%mod;
		base=(base*base)%mod;
		exponent/=2;
	}
	return ans;
}
ll gcd(ll a, ll b){
	if(b==0) return a;
	else return gcd(b,a%b);
}
int log_base_2(int n){
	int temp=1,ans=0;
	while(temp<n){
		temp*=2;
		ans++;
	}
	return ans;
}
const int upperlimit = 3e5;
const int mod = 1e9+7;
struct data{
	int ind,val;
};
bool cmp(data a,data b){
	return(a.val<b.val);
}
data arr[upperlimit+1];
int main() {
	int n,x1,x2;
	sd(n);
	sd(x1);
	sd(x2);
	for(int i = 1; i <= n; i++){
		arr[i].ind=i;
		sd(arr[i].val);
	}
	sort(arr+1,arr+n+1,cmp);
	int a=1,b=1;
	bool check=true;
	for(int i = n; i > 0; i--){
		if(arr[i].val*a>=x1){
			b=1;
			while((b<=n-a)&&(arr[i-b].val*b<x2)){
				b++;
			}
			if(arr[i-b].val*b>=x2){
				printf("Yes\n");
				pds(a);
				pdn(b);
				for(int j=0;j<a;j++){
					pds(arr[n-j].ind);
				}
				printf("\n");
				for(int j=a;j<a+b;j++){
					pds(arr[n-j].ind);
				}
				check=0;
			}
			break;
		}
		else{
			a++;
		}
	}
	swap(x1,x2);
	if(check){
		a=1;
		for(int i = n; i > 0; i--){
			if(arr[i].val*a>=x1){
				b=1;
				while((b<=n-a)&&(arr[i-b].val*b<x2)){
					b++;
				}
				if(arr[i-b].val*b>=x2){
					printf("Yes\n");
					pds(a);
					pdn(b);
					for(int j=a;j<a+b;j++){
						pds(arr[n-j].ind);
					}
					printf("\n");
					for(int j=0;j<a;j++){
						pds(arr[n-j].ind);
					}
					check=0;
				}
				break;
			}
			else{
				a++;
			}
		}
	}
	if(check){
		printf("No");
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pcc pair<char,char>
#define vi vector <int>
#define vl vector <ll>
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define pd(x) printf("%d",x)
#define plld(x) printf("%lld",x)
#define pds(x) printf("%d ",x)
#define pllds(x) printf("%lld ",x)
#define pdn(x) printf("%d\n",x)
#define plldn(x) printf("%lld\n",x)
#define spn setprecision
using namespace std;
ll multiply(ll num1, ll num2, ll mod) { // with mod > 1e9
	ll ans = 0;
	num1 %= mod;
	num2 %= mod;
	while (num2) {
		if (num2&1) {
			ans += num1;
			ans %= mod;
		}
		num1 *= 2;
		num1 %= mod;
		num2 /= 2;
	}
	return ans;
}
ll powmod2(ll base,ll exponent,ll mod){ // with mod > 1e9
	ll ans = 1;
	while (exponent) {
		if (exponent&1) {
			ans = multiply(ans, base, mod);
		}
		base = multiply(base, base, mod);
		exponent /= 2;
	}
	return ans;
}
ll powmod(ll base,ll exponent,ll mod){ // with mod < 1e9
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%mod;
		base=(base*base)%mod;
		exponent/=2;
	}
	return ans;
}
ll gcd(ll a, ll b){
	if(b==0) return a;
	else return gcd(b,a%b);
}
int log_base_2(int n){
	int temp=1,ans=0;
	while(temp<n){
		temp*=2;
		ans++;
	}
	return ans;
}
const int upperlimit = 3e5;
const int mod = 1e9+7;
struct data{
	int ind,val;
};
bool cmp(data a,data b){
	return(a.val<b.val);
}
data arr[upperlimit+1];
int main() {
	int n,x1,x2;
	sd(n);
	sd(x1);
	sd(x2);
	for(int i = 1; i <= n; i++){
		arr[i].ind=i;
		sd(arr[i].val);
	}
	sort(arr+1,arr+n+1,cmp);
	int a=1,b=1;
	bool check=true;
	for(int i = n; i > 0; i--){
		if(arr[i].val*a>=x1){
			b=1;
			while((b<=n-a)&&(arr[i-b].val*b<x2)){
				b++;
			}
			if(arr[i-b].val*b>=x2){
				printf("Yes\n");
				pds(a);
				pdn(b);
				for(int j=0;j<a;j++){
					pds(arr[n-j].ind);
				}
				printf("\n");
				for(int j=a;j<a+b;j++){
					pds(arr[n-j].ind);
				}
				check=0;
				break;
			}
		}
		else{
			a++;
		}
	}
	swap(x1,x2);
	if(check){
		a=1;
		for(int i = n; i > 0; i--){
			if(arr[i].val*a>=x1){
				b=1;
				while((b<=n-a)&&(arr[i-b].val*b<x2)){
					b++;
				}
				if(arr[i-b].val*b>=x2){
					printf("Yes\n");
					pds(a);
					pdn(b);
					for(int j=a;j<a+b;j++){
						pds(arr[n-j].ind);
					}
					printf("\n");
					for(int j=0;j<a;j++){
						pds(arr[n-j].ind);
					}
					check=0;
					break;
				}
			}
			else{
				a++;
			}
		}
	}
	if(check){
		printf("No");
	}
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pcc pair<char,char>
#define vi vector <int>
#define vl vector <ll>
#define sd(x) scanf("%d",&x)
#define slld(x) scanf("%lld",&x)
#define pd(x) printf("%d",x)
#define plld(x) printf("%lld",x)
#define pds(x) printf("%d ",x)
#define pllds(x) printf("%lld ",x)
#define pdn(x) printf("%d\n",x)
#define plldn(x) printf("%lld\n",x)
#define spn setprecision
using namespace std;
ll multiply(ll num1, ll num2, ll mod) { // with mod > 1e9
	ll ans = 0;
	num1 %= mod;
	num2 %= mod;
	while (num2) {
		if (num2&1) {
			ans += num1;
			ans %= mod;
		}
		num1 *= 2;
		num1 %= mod;
		num2 /= 2;
	}
	return ans;
}
ll powmod2(ll base,ll exponent,ll mod){ // with mod > 1e9
	ll ans = 1;
	while (exponent) {
		if (exponent&1) {
			ans = multiply(ans, base, mod);
		}
		base = multiply(base, base, mod);
		exponent /= 2;
	}
	return ans;
}
ll powmod(ll base,ll exponent,ll mod){ // with mod < 1e9
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%mod;
		base=(base*base)%mod;
		exponent/=2;
	}
	return ans;
}
ll gcd(ll a, ll b){
	if(b==0) return a;
	else return gcd(b,a%b);
}
int log_base_2(int n){
	int temp=1,ans=0;
	while(temp<n){
		temp*=2;
		ans++;
	}
	return ans;
}
const int upperlimit = 3e5;
const int mod = 1e9+7;
struct data{
	int ind,val;
};
bool cmp(data a,data b){
	return(a.val<b.val);
}
data arr[upperlimit+1];
int main() {
	int n,x1,x2;
	sd(n);
	sd(x1);
	sd(x2);
	for(int i = 1; i <= n; i++){
		arr[i].ind=i;
		sd(arr[i].val);
	}
	sort(arr+1,arr+n+1,cmp);
	int a=1,b=1;
	bool check=true;
	for(int i = n; i > 0; i--){
		if(arr[i].val*a>=x1){
			b=1;
			while((b<=n-a)&&(arr[i-b].val*b<x2)){
				b++;
			}
			if(arr[i-b].val*b>=x2){
				printf("Yes\n");
				pds(a);
				pdn(b);
				for(int j=0;j<a;j++){
					pds(arr[n-j].ind);
				}
				printf("\n");
				for(int j=a;j<a+b;j++){
					pds(arr[n-j].ind);
				}
				check=0;
			}
			break;
		}
		else{
			a++;
		}
	}
	swap(x1,x2);
	if(check){
		a=1;
		for(int i = n; i > 0; i--){
			if(arr[i].val*a>=x1){
				b=1;
				while((b<=n-a)&&(arr[i-b].val*b<x2)){
					b++;
				}
				if(arr[i-b].val*b>=x2){
					printf("Yes\n");
					pds(b);
					pdn(a);
					for(int j=a;j<a+b;j++){
						pds(arr[n-j].ind);
					}
					printf("\n");
					for(int j=0;j<a;j++){
						pds(arr[n-j].ind);
					}
					check=0;
				}
				break;
			}
			else{
				a++;
			}
		}
	}
	if(check){
		printf("No");
	}
	return 0;
}


#include<bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<=(b);++i)
#define DEC(i,a,b) for(int i=(a);i>=(b);--i)
#define dbg(...) fprintf(stderr,__VA_ARGS__)
using namespace std;
template<typename T,typename U> inline bool smax(T&x,const U&y){return y>x?(x=y,1):0;}
template<typename T,typename U> inline bool smin(T&x,const U&y){return y<x?(x=y,1):0;}
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define X first
#define Y second
inline int read(){
    int w=0,p=0;char c;
    while(!isdigit(c=getchar()))if(c=='-')p=1;
    while(isdigit(c))w=(w<<1)+(w<<3)+(c^'0'),c=getchar();
    return p?-w:w;
}
const int N=3e5+7;
int n,x1,x2;
pii c[N];
bool f=0;
int p[N],cnt;
void out(int a,int b,int c,int d){
	if(f)swap(a,c),swap(b,d);
	printf("%d %d\n",b-a+1,d-c+1);
	cnt=0;
	REP(i,a,b)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
	cnt=0;
	REP(i,c,d)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
}
int rr=0;
int num[N],siz,ss;
pii qa[N];
#define l(x) ((x-1)*siz+1)
#define r(x) (x==ss?n:x*siz)
#define bel(x) ((x-1)/siz+1)
inline int ask(int p,int x){
	if(p<=siz){
		REP(i,1,p)if(c[i].X<x)return i;
		return 0;
	}
	int be=bel(p)-1;
	REP(i,1,be){
		int t=lower_bound(qa+l(i),qa+r(i)+1,make_pair(x,0))-qa-1;
		if(t>=l(i))return t;
	}
	return 0;
}
void check(int x){
	int t1=ceil(1.0*x1/x);
	int p=lower_bound(c+1,c+1+n,make_pair(t1,0))-c;
//	dbg("pp%d\n",p);
	if(n-p+1<x)return;
	if(p+x<=rr)out(p,p+x-1,rr,n),exit(0);
	int t=ask(p-1,p);
	if(t)out(p,p+x-1,t,num[t]),exit(0);
}

int main(){
	n=read(),x1=read(),x2=read();
	if(x1>x2)f=1,swap(x1,x2);
	REP(i,1,n)c[i]=make_pair(read(),i);
	sort(c+1,c+1+n);
	DEC(i,n,1){
		int x=ceil(1.0*x2/(n-i+1));
		if(c[i].X>=x){
			rr=i;break;
		}
	}
	REP(i,1,n)num[i]=(x2-1)/c[i].X+i,qa[i]=make_pair(num[i],i);
	siz=sqrt(n/log2(n));ss=bel(n);
	REP(i,1,ss)sort(qa+l(i),qa+r(i));
//	dbg("rr %d\n",rr);
	if(!rr)return puts("No"),0;
	REP(i,1,n)check(i);
	puts("No");
	return 0;
}


#include<bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<=(b);++i)
#define DEC(i,a,b) for(int i=(a);i>=(b);--i)
#define dbg(...) fprintf(stderr,__VA_ARGS__)
using namespace std;
template<typename T,typename U> inline bool smax(T&x,const U&y){return y>x?(x=y,1):0;}
template<typename T,typename U> inline bool smin(T&x,const U&y){return y<x?(x=y,1):0;}
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define X first
#define Y second
inline int read(){
    int w=0,p=0;char c;
    while(!isdigit(c=getchar()))if(c=='-')p=1;
    while(isdigit(c))w=(w<<1)+(w<<3)+(c^'0'),c=getchar();
    return p?-w:w;
}
const int N=3e5+7;
int n,x1,x2;
pii c[N];
bool f=0;
int p[N],cnt;
void out(int a,int b,int c,int d){
	if(f)swap(a,c),swap(b,d);
	printf("Yes\n%d %d\n",b-a+1,d-c+1);
	cnt=0;
	REP(i,a,b)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
	cnt=0;
	REP(i,c,d)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
}
int rr=0;
int num[N],siz,ss;
pii qa[N];
#define l(x) ((x-1)*siz+1)
#define r(x) (x==ss?n:x*siz)
#define bel(x) ((x-1)/siz+1)
inline int ask(int p,int x){
	if(p<=siz){
		REP(i,1,p)if(c[i].X<x)return i;
		return 0;
	}
	int be=bel(p)-1;
	REP(i,1,be){
		int t=lower_bound(qa+l(i),qa+r(i)+1,make_pair(x,0))-qa-1;
		if(t>=l(i))return t;
	}
	return 0;
}
void check(int x){
	int t1=ceil(1.0*x1/x);
	int p=lower_bound(c+1,c+1+n,make_pair(t1,0))-c;
//	dbg("pp%d\n",p);
	if(n-p+1<x)return;
	if(p+x<=rr)out(p,p+x-1,rr,n),exit(0);
	int t=ask(p-1,p);
	if(t)out(p,p+x-1,t,num[t]),exit(0);
}

int main(){
	n=read(),x1=read(),x2=read();
	if(x1>x2)f=1,swap(x1,x2);
	REP(i,1,n)c[i]=make_pair(read(),i);
	sort(c+1,c+1+n);
	DEC(i,n,1){
		int x=ceil(1.0*x2/(n-i+1));
		if(c[i].X>=x){
			rr=i;break;
		}
	}
	REP(i,1,n)num[i]=(x2-1)/c[i].X+i,qa[i]=make_pair(num[i],i);
	siz=sqrt(n/log2(n));ss=bel(n);
	REP(i,1,ss)sort(qa+l(i),qa+r(i));
//	dbg("rr %d\n",rr);
	if(!rr)return puts("No"),0;
	REP(i,1,n)check(i);
	puts("No");
	return 0;
}


#include<bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<=(b);++i)
#define DEC(i,a,b) for(int i=(a);i>=(b);--i)
#define dbg(...) fprintf(stderr,__VA_ARGS__)
using namespace std;
template<typename T,typename U> inline bool smax(T&x,const U&y){return y>x?(x=y,1):0;}
template<typename T,typename U> inline bool smin(T&x,const U&y){return y<x?(x=y,1):0;}
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define X first
#define Y second
inline int read(){
    int w=0,p=0;char c;
    while(!isdigit(c=getchar()))if(c=='-')p=1;
    while(isdigit(c))w=(w<<1)+(w<<3)+(c^'0'),c=getchar();
    return p?-w:w;
}
const int N=3e5+7;
int n,x1,x2;
pii c[N];
bool f=0;
int p[N],cnt;
void out(int a,int b,int c,int d){
	if(f)swap(a,c),swap(b,d);
	printf("Yes\n%d %d\n",b-a+1,d-c+1);
	cnt=0;
	REP(i,a,b)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
	cnt=0;
	REP(i,c,d)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
}
int rr=0;
int num[N],siz,ss;
pii qa[N];
#define l(x) ((x-1)*siz+1)
#define r(x) (x==ss?n:x*siz)
#define bel(x) ((x-1)/siz+1)
inline int ask(int p){
//	dbg("ppp%d\n",p);
	if(!p)return 0;
	if(p<=siz){
		REP(i,1,p){//dbg("iii %d %d\n",i,num[i]);
		if(num[i]<=p)return i;
		}
		return 0;
	}
	int be=bel(p)-1;
	REP(i,1,be){

		int t=upper_bound(qa+l(i),qa+r(i)+1,make_pair(p,0x3f3f3f3f))-qa-1;//dbg("kuai %d %d -> %d %d %d\n",i,l(i),r(i),t,qa[l(i)]);
		if(t>=l(i))return t;
	}
	return 0;
}
void check(int x){
	int t1=ceil(1.0*x1/x);
	int p=lower_bound(c+1,c+1+n,make_pair(t1,0))-c;
//	dbg("pp%d\n",p);
	if(n-p+1<x)return;
	if(p+x<=rr)out(p,p+x-1,rr,n),exit(0);
	int t=ask(p-1);
	if(t)out(p,p+x-1,t,num[t]),exit(0);
}
int main(){
	n=read(),x1=read(),x2=read();
	if(x1>x2)f=1,swap(x1,x2);
	REP(i,1,n)c[i]=make_pair(read(),i);
	sort(c+1,c+1+n);
	DEC(i,n,1){
		int x=ceil(1.0*x2/(n-i+1));
		if(c[i].X>=x){
			rr=i;break;
		}
	}
	REP(i,1,n)num[i]=(x2-1)/c[i].X+i,qa[i]=make_pair(num[i],i);
	siz=sqrt(n/log2(n));ss=bel(n);
	REP(i,1,ss)sort(qa+l(i),qa+r(i)+1);
//	dbg("rr %d\n",rr);
	if(!rr)return puts("No"),0;
	REP(i,1,n)check(i);
	puts("No");
	return 0;
}


#include<bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<=(b);++i)
#define DEC(i,a,b) for(int i=(a);i>=(b);--i)
#define dbg(...) fprintf(stderr,__VA_ARGS__)
using namespace std;
template<typename T,typename U> inline bool smax(T&x,const U&y){return y>x?(x=y,1):0;}
template<typename T,typename U> inline bool smin(T&x,const U&y){return y<x?(x=y,1):0;}
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define X first
#define Y second
inline int read(){
    int w=0,p=0;char c;
    while(!isdigit(c=getchar()))if(c=='-')p=1;
    while(isdigit(c))w=(w<<1)+(w<<3)+(c^'0'),c=getchar();
    return p?-w:w;
}
const int N=3e5+7;
int n,x1,x2;
pii c[N];
bool f=0;
int p[N],cnt;
void out(int a,int b,int c,int d){
	if(f)swap(a,c),swap(b,d);
	printf("Yes\n%d %d\n",b-a+1,d-c+1);
	cnt=0;
	REP(i,a,b)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
	cnt=0;
	REP(i,c,d)p[++cnt]=::c[i].Y;
	sort(p+1,p+1+cnt);
	REP(i,1,cnt)printf("%d ",p[i]);puts("");
}
int rr=0;
int num[N],siz,ss;
pii qa[N];
#define l(x) ((x-1)*siz+1)
#define r(x) (x==ss?n:x*siz)
#define bel(x) ((x-1)/siz+1)
inline int ask(int p){
//	dbg("ppp%d\n",p);
	if(!p)return 0;
	if(p<=siz){
		REP(i,1,p){//dbg("iii %d %d\n",i,num[i]);
		if(num[i]<=p)return i;
		}
		return 0;
	}
	int be=bel(p)-1;
	REP(i,1,be){

		int t=upper_bound(qa+l(i),qa+r(i)+1,make_pair(p,0x3f3f3f3f))-qa-1;//dbg("kuai %d %d -> %d %d %d\n",i,l(i),r(i),t,qa[l(i)]);
		if(t>=l(i))return qa[t].Y;
	}
	++be;
	REP(i,l(be),p)if(num[i]<=p)return i;
	return 0;
}
void check(int x){
	int t1=ceil(1.0*x1/x);
	int p=lower_bound(c+1,c+1+n,make_pair(t1,0))-c;
//	dbg("pp%d\n",p);
	if(n-p+1<x)return;
	if(p+x<=rr)out(p,p+x-1,rr,n),exit(0);
	int t=ask(p-1);
	if(t)out(p,p+x-1,t,num[t]),exit(0);
}
int main(){
	n=read(),x1=read(),x2=read();
	if(x1>x2)f=1,swap(x1,x2);
	REP(i,1,n)c[i]=make_pair(read(),i);
	sort(c+1,c+1+n);
	DEC(i,n,1){
		int x=ceil(1.0*x2/(n-i+1));
		if(c[i].X>=x){
			rr=i;break;
		}
	}
	REP(i,1,n)num[i]=(x2-1)/c[i].X+i,qa[i]=make_pair(num[i],i);
	siz=sqrt(n/log2(n));ss=bel(n);
	REP(i,1,ss)sort(qa+l(i),qa+r(i)+1);
//	dbg("rr %d\n",rr);
	if(!rr)return puts("No"),0;
	REP(i,1,n)check(i);
	puts("No");
	return 0;
}


#include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
const int MAXN=300005,INF=0x3f3f3f3f;

int n,c0,c1,min_r=INF,ans_id,ans_len,ans0[MAXN],ans1[MAXN];

struct data{
	int x,id;
	bool operator <(const data v)const{return x<v.x;}
	bool operator <(const int v)const{return x<v;}
} a[MAXN];

int main(){
	scanf("%d%d%d",&n,&c0,&c1);
	for (int i=1;i<=n;i++) scanf("%d",&a[i].x),a[i].id=i;
	sort(a+1,a+1+n);
	for (int i=1;i<=n;i++){
		double now_=1.0*c0/i;
		int now=now_;
		if (now<now_) now++;
		int k=lower_bound(a+1,a+1+n,now)-a;
		if (k+i-1<=n&&k+i-1<=min_r) min_r=k+i-1,ans_id=k,ans_len=i;
	}
	for (int i=n;i>min_r;i--){
		if (c1<=1ll*a[i].x*(n-i+1)){
			printf("Yes\n");
			printf("%d %d\n",ans_len,n-i+1);
			for (int j=ans_id;j<=ans_id+ans_len-1;j++){
				if (j==ans_id) printf("%d",a[j].id);
				else printf(" %d",a[j].id);
			}
			printf("\n");
			for (int j=i;j<=n;j++){
				if (j==i) printf("%d",a[j].id);
				else printf(" %d",a[j].id);
			}
			printf("\n");
			return 0;
		}
	}
	std::swap(c0,c1);
	min_r=INF; ans_id=ans_len=0;
	for (int i=1;i<=n;i++){
		double now_=1.0*c0/i;
		int now=now_;
		if (now<now_) now++;
		int k=lower_bound(a+1,a+1+n,now)-a;
		if (k+i-1<=n&&k+i-1<=min_r) min_r=k+i-1,ans_id=k,ans_len=i;
	}
	for (int i=n;i>min_r;i--){
		if (c1<=1ll*a[i].x*(n-i+1)){
			printf("Yes\n");
			printf("%d %d\n",n-i+1,ans_len);
			for (int j=i;j<=n;j++){
				if (j==i) printf("%d",a[j].id);
				else printf(" %d",a[j].id);
			}
			printf("\n");
			for (int j=ans_id;j<=ans_id+ans_len-1;j++){
				if (j==ans_id) printf("%d",a[j].id);
				else printf(" %d",a[j].id);
			}
			printf("\n");
			return 0;
		}
	}
	printf("No\n");
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 300000+5;

int n, k1, k2;
struct node {
	int id, x;
	bool operator < (const node &b) const {return x > b.x; }
}a[N];

void work() {
	scanf("%d%d%d", &n, &k1, &k2);
	for (int i = 1; i <= n; i++) a[i].id = i, scanf("%d", &a[i].x);
	sort(a+1, a+n+1);
	int loc = -1;
	for (int i = 1; i <= n; i++)
		if (1ll*a[i].x*i >= k1) {loc = i; break; }
	if (loc == -1) {printf("No\n"); return; }
	int newloc = -1;
	for (int i = loc+1; i <= n; i++)
		if (1ll*a[i].x*(i-loc) >= k2) {newloc = i; break; }
	if (newloc != -1) {
		printf("Yes\n");
		printf("%d %d\n", loc, newloc-loc);
		for (int i = 1; i <= loc; i++) printf("%d ", a[i].id);
		printf("\n");
		for (int i = loc+1; i <= newloc; i++) printf("%d ", a[i].id);
		printf("\n");
		return;
	}
	swap(k1, k2); loc = -1, newloc = -1;
	for (int i = 1; i <= n; i++)
		if (1ll*a[i].x*i >= k1) {loc = i; break; }
	if (loc == -1) {printf("No\n"); return; }
	for (int i = loc+1; i <= n; i++)
		if (1ll*a[i].x*(i-loc) >= k2) {newloc = i; break; }
	if (newloc != -1) {
		printf("Yes\n");
		printf("%d %d\n", newloc-loc, loc);
		for (int i = loc+1; i <= newloc; i++) printf("%d ", a[i].id);
		printf("\n");
		for (int i = 1; i <= loc; i++) printf("%d ", a[i].id);
		printf("\n");
		return;
	}
	printf("No");
}
int main() {work(); return 0; }


#include <stdio.h>
const int C=350001;
const int Cv=1<<20;

int n, pos[C], x, y, a[C], val[2*Cv], par1[2*Cv], par2[2*Cv], tmp, i, j, f, g;

int pom[C], pom2[C];
void Sebasort (int tab[], int tab2[], int l, int r){
	int lim=2, limi=l+1, limj=l+2, j=limi, i=l, k=l;
	while (lim/2<=r-l+1){
		while (i<=r){
			if (limj>r)	limj=r+1;
			if ((tab[j]<tab[i]&&j<limj)||i>=limi)	pom[k]=tab[j], pom2[k]=tab2[j], j++;
			else pom[k]=tab[i], pom2[k]=tab2[i], i++;
			k++;
			if (i==limi&&j==limj)	limi+=lim, limj+=lim, i=j, j=limi;
		}
		i=l;
		while (i<=r){
			tab[i]=pom[i], tab2[i]=pom2[i];
			i++;
		}
		lim*=2, limi=l+lim/2, limj=l+lim, j=limi, i=k=l;
	}
}

void insert (int a, int p1, int p2){
	a+=Cv;
	while (a>0){
		val[a]=1, par1[a]=p1, par2[a]=p2;
		a/=2;
	}
}

int query (int l, int r){
	l+=Cv, r+=Cv;
	if (val[l]==1)	return l;
	if (val[r]==1)	return r;
	while (l>0){
		if (l%2==0&&r-l>1&&val[l+1]==1)	return l+1;
		if (r%2==1&&r-l>1&&val[r-1]==1)	return r-1;
		l/=2, r/=2;
	}
	return -1;
}

int main(){
	scanf ("%d %d %d", &n, &x, &y);
	for (int z=0;z<n;z++)	scanf ("%d", &a[z]), pos[z]=z;

	Sebasort (a, pos, 0, n-1);

	j=n-1;
	for (i=1;i<n;i++){
		for (;j>=0;j--){
			if (a[j]*i<x)	break;
		}
		insert(j+i, j+1, i);
	}

	for (i=n-1;i>0;i--){
		if (a[i]*(n-i)>=y){
			f=query(0, i-1);
			if (f>0)	break;
		}
	}

	if (i==0)	{
		for (int z=0;z<2*Cv;z++)	val[z]=0;
		tmp=x, x=y, y=tmp;

		j=n-1;
		for (i=1;i<n;i++){
			for (;j>=0;j--){
				if (a[j]*i<x)	break;
			}
			insert(j+i, j+1, i);
		}

		for (i=n-1;i>0;i--){
			if (a[i]*(n-i)>=y){
				f=query(0, i-1);
				if (f>0)	break;
			}
		}

		if (i==0)	printf ("No");
		else {
			printf ("Yes\n");
			printf ("%d %d\n", par2[f], n-i);
			for (int z=par1[f];z<par1[f]+par2[f];z++)	printf ("%d ", pos[z]+1);
			printf ("\n");

			for (int z=i;z<n;z++)	printf ("%d ", pos[z]+1);
		}

	}

	else{
		printf ("Yes\n");
		printf ("%d %d\n", par2[f], n-i);
		for (int z=par1[f];z<par1[f]+par2[f];z++)	printf ("%d ", pos[z]+1);
		printf ("\n");

		for (int z=i;z<n;z++)	printf ("%d ", pos[z]+1);
	}

return 0;}


#include <stdio.h>
const int C=350001;
const int Cv=1<<20;

int n, pos[C], x, y, a[C], val[2*Cv], par1[2*Cv], par2[2*Cv], tmp, i, j, f, g;

int pom[C], pom2[C];
void Sebasort (int tab[], int tab2[], int l, int r){
	int lim=2, limi=l+1, limj=l+2, j=limi, i=l, k=l;
	while (lim/2<=r-l+1){
		while (i<=r){
			if (limj>r)	limj=r+1;
			if ((tab[j]<tab[i]&&j<limj)||i>=limi)	pom[k]=tab[j], pom2[k]=tab2[j], j++;
			else pom[k]=tab[i], pom2[k]=tab2[i], i++;
			k++;
			if (i==limi&&j==limj)	limi+=lim, limj+=lim, i=j, j=limi;
		}
		i=l;
		while (i<=r){
			tab[i]=pom[i], tab2[i]=pom2[i];
			i++;
		}
		lim*=2, limi=l+lim/2, limj=l+lim, j=limi, i=k=l;
	}
}

void insert (int a, int p1, int p2){
	a+=Cv;
	while (a>0){
		val[a]=1, par1[a]=p1, par2[a]=p2;
		a/=2;
	}
}

int query (int l, int r){
	l+=Cv, r+=Cv;
	if (val[l]==1)	return l;
	if (val[r]==1)	return r;
	while (l>0){
		if (l%2==0&&r-l>1&&val[l+1]==1)	return l+1;
		if (r%2==1&&r-l>1&&val[r-1]==1)	return r-1;
		l/=2, r/=2;
	}
	return -1;
}

int main(){
	scanf ("%d %d %d", &n, &x, &y);
	for (int z=0;z<n;z++)	scanf ("%d", &a[z]), pos[z]=z;

	Sebasort (a, pos, 0, n-1);

	j=n-1;
	for (i=1;i<n;i++){
		for (;j>=0;j--){
			if (a[j]*i<x)	break;
		}
		insert(j+i, j+1, i);
	}

	for (i=n-1;i>0;i--){
		if (a[i]*(n-i)>=y){
			f=query(0, i-1);
			if (f>0)	break;
		}
	}

	if (i==0)	{
		for (int z=0;z<2*Cv;z++)	val[z]=0;
		tmp=x, x=y, y=tmp;

		j=n-1;
		for (i=1;i<n;i++){
			for (;j>=0;j--){
				if (a[j]*i<x)	break;
			}
			insert(j+i, j+1, i);
		}

		for (i=n-1;i>0;i--){
			if (a[i]*(n-i)>=y){
				f=query(0, i-1);
				if (f>0)	break;
			}
		}

		if (i==0)	printf ("No");
		else {
			printf ("Yes\n");
			printf ("%d %d\n", n-i, par2[f]);
			for (int z=i;z<n;z++)	printf ("%d ", pos[z]+1);
			printf ("\n");

			for (int z=par1[f];z<par1[f]+par2[f];z++)	printf ("%d ", pos[z]+1);

		}

	}

	else{
		printf ("Yes\n");
		printf ("%d %d\n", par2[f], n-i);
		for (int z=par1[f];z<par1[f]+par2[f];z++)	printf ("%d ", pos[z]+1);
		printf ("\n");

		for (int z=i;z<n;z++)	printf ("%d ", pos[z]+1);
	}

return 0;}


#include<bits/stdc++.h>
using namespace std;
const int N=3.1e5;
int n,x1,x2;
typedef long long ll;
struct node{int val,id;}a[N];
bool cmp(node x,node y){return x.val>y.val;}
int main()
{
	cin>>n>>x1>>x2;
	for(int i=1;i<=n;i++)scanf("%d",&a[i].val),a[i].id=i;
	sort(a+1,a+1+n,cmp);
	for(int i=1;i<=n;i++)
		if((ll)a[i].val*i>=x1){
			for(int j=i+1;j<=n;j++)
				if((ll)a[j].val*(j-i)>=x2){
					cout<<"Yes"<<endl<<i<<' '<<j-i<<endl;
					for(int k=1;k<=i;k++)printf("%d%c",a[k].id," \n"[k==i]);
					for(int k=i+1;k<=j;k++)printf("%d%c",a[k].id," \n"[k==j]);
					return 0;
				}
			break;
		}
	swap(x1,x2);
	for(int i=1;i<=n;i++)
		if((ll)a[i].val*i>=x1){
			for(int j=i+1;j<=n;j++)
				if((ll)a[j].val*(j-i)>=x2){
					cout<<"Yes"<<endl<<j-i<<' '<<i<<endl;
					for(int k=i+1;k<=j;k++)printf("%d%c",a[k].id," \n"[k==j]);
					for(int k=1;k<=i;k++)printf("%d%c",a[k].id," \n"[k==i]);
					return 0;
				}
			break;
		}
	cout<<"No"<<endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;

const int N = 666666;
const int M = 666;
const ll md = 1e9 + 7;

ll addmod(ll a, ll b)
{
	return (a + b) % md;
}

template <class T> void mine(T &a, T b)
{
	if (a > b) a = b;
}

int n, m, k, q;
ll ans;
int a[N], b[N];
int ans1, ans2;
int a1[N], a2[N];
pair<int, int> p[N];
int x[N];

void gen(int* a, int sa, int* b, int sb)
{
	for (int i = 1; i <= sa + sb; i++)
	{
		int t = p[n + 1 - i].second;
		if (i <= sa)
			a[i] = t;
		else
			b[i - sa] = t;
	}
}

int main()
{
	ios::sync_with_stdio(false); cout<<setprecision(20);

	scanf("%d%d%d", &n, &m, &k);
	for (int i = 1; i <= n; i++)
	{
		scanf("%d", &p[i].first);
		p[i].second = i;
	}
	sort(p + 1, p + n + 1);
	for (int i = 1; i <= n; i++)
		x[i] = p[i].first;

	int m1 = md, m2 = md;
	for (int i = 1; i <= n; i++)
	{
		a[i] = lower_bound(x + 1, x + n + 1, (m - 1) / i + 1) - x;
		b[i] = lower_bound(x + 1, x + n + 1, (k - 1) / i + 1) - x;
		if ((m - 1) / i + 1 <= x[n + 1 - i])
			mine(m1, i);
		if ((k - 1) / i + 1 <= x[n + 1 - i])
			mine(m2, i);
		//printf ("+ %d %d\n", a[i], b[i]);
	}

	//printf("%d %d\n", m1, m2);

	for (int i = 1; i <= n; i++)
	{
		if (n + 1 - a[i] >= i + m2)
		{
			ans1 = i;
			ans2 = m2;
			gen(a2, ans2, a1, ans1);
			break;
		}
		if (n + 1 - b[i] >= i + m1)
		{
			ans2 = i;
			ans1 = m1;
			gen(a1, ans1, a2, ans2);
			break;
		}
	}

	if (ans1)
	{
		printf("Yes\n%d %d\n", ans1, ans2);
		for (int i = 1; i <= ans1; i++)
			printf("%d%c", a1[i], i == ans1 ? '\n' : ' ');
		for (int i = 1; i <= ans2; i++)
			printf("%d%c", a2[i], i == ans2 ? '\n' : ' ');
	}
	else
		puts("No");

	return 0;
}


#include<cstdio>
#include<algorithm>
using namespace std;
const int maxn=300005;
int n;
long long x1,x2;

struct sss
{
    long long val;
    int num;
}a[maxn];

bool cmp(const sss &a,const sss &b)
{
    return a.val>b.val;
}

void scanff()
{
    scanf("%d%I64d%I64d",&n,&x1,&x2);
    for(int i=1;i<=n;i++)
    {
        scanf("%I64d",&a[i].val);
        a[i].num=i;
    }
    sort(a+1,a+n+1,cmp);
}

void work()
{
    int now1,now2;
    bool flag=false;
    if(x1<x2)
    {
        swap(x1,x2);
        flag=true;
    }
    for(now1=1;now1<=n;now1++)
    {
        if(a[now1].val*now1>=x1)break;
    }
    if(now1>n)
    {
        printf("No\n");
        return;
    }
    for(now2=now1+1;now2<=n;now2++)
    {
        if(a[now2].val*(now2-now1)>=x2)break;
    }
    if(now2>n)
    {
        int head=1,tail=now1;
        for(;;)
        {
            if(tail+1<=n)
            {
                if(a[tail+1].val*(tail-head+1)>=x1)
                {
                    tail++;
                    head++;
                    if(a[head-1].val*(head-1)>=x2)
                    {
                        printf("Yes\n");
                        if(!flag)
                        {
                            printf("%d %d\n",tail-head+1,head-1);
                            for(int i=head;i<=tail;i++)
                            {
                                printf("%d ",a[i].num);
                            }
                            printf("\n");
                            for(int i=1;i<=head-1;i++)
                            {
                                printf("%d ",a[i].num);
                            }
                            return;
                        }else
                        {
                            printf("%d %d\n",head-1,tail-head+1);
                            for(int i=1;i<=head-1;i++)
                            {
                                printf("%d ",a[i].num);
                            }
                            printf("\n");
                            for(int i=head;i<=tail;i++)
                            {
                                printf("%d ",a[i].num);
                            }
                            return;
                        }
                    }
                }else
                {
                    tail++;
                }
            }else break;
        }
        printf("No\n");
        return;
    }
    printf("Yes\n");
    if(!flag)
    {
        printf("%d %d\n",now1,now2-now1);
        for(int i=1;i<=now1;i++)
        {
            printf("%d ",a[i].num);
        }
        printf("\n");
        for(int i=now1+1;i<=now2;i++)
        {
            printf("%d ",a[i].num);
        }
    }else
    {
        printf("%d %d\n",now2-now1,now1);
        for(int i=now1+1;i<=now2;i++)
        {
            printf("%d ",a[i].num);
        }
        printf("\n");
        for(int i=1;i<=now1;i++)
        {
            printf("%d ",a[i].num);
        }
    }
}

int main()
{
    scanff();
    work();
    return 0;
}


#include<cstdio>
#include<ctime>
#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<cstring>
#define rg register
#define il inline
#define vd void
#define ll long long
#define For(i,j,k)  for(ll i=j;i<=k;++i)
#define Dow(i,j,k)  for(ll i=k;i>=j;--i)
using namespace std;
il ll max(ll x,ll y){return x>y?x:y;}
il ll min(ll x,ll y){return x<y?x:y;}
il ll read(){
    ll x=0;int ch=getchar(),f=1;
    while (!isdigit(ch)&&(ch!='-')&&(ch!=EOF)) ch=getchar();
    if (ch=='-'){f=-1;ch=getchar();}
    while (isdigit(ch)){x=(x<<1)+(x<<3)+ch-'0';ch=getchar();}
    return x*f;
}
il vd write(ll x){if(x<0) {putchar('-');write(-x);return;}if(x>=10)    write(x/10);putchar(x%10+'0');}
il vd writeln(ll x){write(x);puts("");}
il vd write_p(ll x){write(x);putchar(' ');}
ll n,x1,x2,tep;
struct node{
	ll v,num;
}a[500001];
bool f;
il bool cmp(node x,node y){return x.v<y.v;}
il vd Solve(){
	tep=0;
	Dow(i,1,n)
		if(a[i].v*(n-i+1)>=x1){
			tep=i;
			break;
		}
	Dow(i,1,tep-1){
		if(a[i].v*(tep-i)>=x2){
			puts("Yes");
			if(f==1){
				write_p(tep-i),writeln(n-tep+1);
				For(j,i,tep-1) write_p(a[j].num);puts("");
				For(j,tep,n) write_p(a[j].num);puts("");
				exit(0);
			}
			else{
				write_p(n-tep+1);writeln(tep-i);
				For(j,tep,n) write_p(a[j].num);puts("");
				For(j,i,tep-1) write_p(a[j].num);puts("");
				exit(0);
			}
		}
	}
}
int main(){
	n=read(),x1=read(),x2=read();
	For(i,1,n) a[i].v=read(),a[i].num=i;
	sort(a+1,a+n+1,cmp);
	Solve();
	swap(x1,x2);f=1;
	Solve();
	puts("No");
}


#include <bits/stdc++.h>
using namespace std;

const int MAXN=3e5+10;
const int mod=1e9;
typedef long long LL;

struct Node{
    int v,id;
    bool operator < (const Node &a) const{
        return v<a.v;
    }
}x[MAXN];

int n,m,c1,c2,v,t;
int z[MAXN][2];

int main(){
    scanf("%d%d%d",&n,&c1,&c2);
    for(int i=1;i<=n;i++){
        scanf("%d",&x[i].v);
        x[i].id=i;
    }
    sort(x+1,x+n+1);
    int tag=0;
    if (c1>c2){
        tag=1;
        swap(c1,c2);
    }
    int tt=0;
    for(int i=1;i<n;i++){
        double bas=1.0*c1/i;
        int l=1,r=n,mid,pos=n+1;
        while(l<=r){
            mid=(l+r)/2;
            if (x[mid].v<bas) l=mid+1;
            else{
                pos=mid;
                r=mid-1;
            }
        }
        if (pos==n+1) continue;
        if (pos+i-1>n) continue;
        if (LL(n-pos-i+1)*x[pos+i].v<c2) continue;
        tt=1;
        z[0][0]=i;
        for(int j=1;j<=i;j++) z[j][0]=x[pos+j-1].id;
        z[0][1]=n-pos-i+1;
        for(int j=pos+i;j<=n;j++) z[j-pos-i+1][1]=x[j].id;
        break;
    }
    if (tt==0){
        swap(c1,c2);
        tag^=1;
        for(int i=1;i<n;i++){
            double bas=1.0*c1/i;
            int l=1,r=n,mid,pos=n+1;
            while(l<=r){
                mid=(l+r)/2;
                if (x[mid].v<bas) l=mid+1;
                else{
                    pos=mid;
                    r=mid-1;
                }
            }
            if (pos==n+1) continue;
            if (pos+i-1>n) continue;
            if (LL(n-pos-i+1)*x[pos+i].v<c2) continue;
            tt=1;
            z[0][0]=i;
            for(int j=1;j<=i;j++) z[j][0]=x[pos+j-1].id;
            z[0][1]=n-pos-i+1;
            for(int j=pos+i;j<=n;j++) z[j-pos-i+1][1]=x[j].id;
            break;
        }
    }
    if (tt==0) puts("No");
    else{
        puts("Yes");
        if (tag==1){
            printf("%d %d\n",z[0][1],z[0][0]);
            for(int i=1;i<=z[0][1];i++) printf("%d ",z[i][1]);
            puts("");
            for(int i=1;i<=z[0][0];i++) printf("%d ",z[i][0]);
            puts("");
        }
        else{
            printf("%d %d\n",z[0][0],z[0][1]);
            for(int i=1;i<=z[0][0];i++) printf("%d ",z[i][0]);
            puts("");
            for(int i=1;i<=z[0][1];i++) printf("%d ",z[i][1]);
            puts("");
        }
    }
    return 0;
}


#include <bits/stdc++.h>
#define maxn 300010
struct arr
{
	int v,x,y,k,t;
}a[maxn]={0};
int n,x,y,i,j,k=0,t=0;
int cmp1(const void *a,const void *b)
{
	return (*(arr *)b).v-(*(arr *)a).v;
}
int cmp2(const void *a,const void *b)
{
	return (*(arr *)a).t-(*(arr *)b).t;
}
int main()
{
	scanf("%d%d%d",&n,&x,&y);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i].v);
		a[i].x=(x-1)/a[i].v+1;
		a[i].y=(y-1)/a[i].v+1;
		a[i].t=i;
	}
	qsort(a+1,n,sizeof(a[0]),cmp1);
	for (i=1;i<=n;i++)
	{
		if (!k && (a[i].x<=i)) k=a[i].x;
		if (!t && (a[i].y<=i)) t=a[i].y;
		if (k && (a[i].y+k<=i))
		{
			printf("Yes\n%d %d\n",k,i-k);
			for (j=1;j<=k;j++)
				a[j].k=1;
			for (j=k+1;j<=i;j++)
				a[j].k=2;
			break;
		}
		if (t && (a[i].x+t<=i))
		{
			printf("Yes\n%d %d\n",i-t,t);
			for (j=1;j<=t;j++)
				a[j].k=2;
			for (j=t+1;j<=i;j++)
				a[j].k=1;
			break;
		}
	}
	if (i>n) printf("No");
		else
		{
			qsort(a+1,n,sizeof(a[0]),cmp2);
			for (i=1;i<=n;i++)
				if (a[i].k==1) printf("%d ",i);
			printf("\n");
			for (i=1;i<=n;i++)
				if (a[i].k==2) printf("%d ",i);
		}
	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 = cc[n-1]+1;
        int tempnownum;
        int 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 += cc[nownum];
                //}
                nownum--;
            }
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= 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 - (int)(temp) * 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 <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;
        int 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 += cc[nownum];
                //}
                nownum--;
            }
            //cout << ti << "*" << did << "*" << nownum <<endl;
            if(ti>=did)
            {
                while(ti>did)
                {
                    tempsum -= 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 - (int)(temp) * 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 <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 <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;
                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)
        {
            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;
}