import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class kabaleo_gk_wa_cases {
    static Scanner in;
    static PrintWriter out;

    int argmax(int[] a, int h) {
        int max = 0;
        int maxi = -1;
        for (int i = 0; i < a.length; i++) {
            if (i != h && max < a[i]) {
                max = a[i];
                maxi = i;
            }
        }
        return maxi;
    }

    int maxCount(int[] a, int h) {
        int max = argmax(a, h);
        int count = 0;
        for (int i = 0; i < a.length; i++) {
            if (i != h && max == a[i]) {
                count++;
            }
        }
        return count;
    }

    void run() {
        int n = in.nextInt();
        int p = in.nextInt();
        int c = in.nextInt();
        int h = in.nextInt();

        int[] board = new int[n];
        for (int i = 0; i < n; i++) {
            board[i] = in.nextInt() - 1;
        }

        int[] players = new int[p];
        for (int i = 0; i < p; i++) {
            players[i] = in.nextInt();
        }

        List<Integer> result = solve(c, h, board, players);
        out.println(result.size());
        for (Integer i : result) {
            out.println(i);
        }
    }

    List<Integer> solve(int c, int h, int[] board, int[] players) {
        int[] colors = new int[c];
        for (int i = 0; i < board.length; i++) {
            colors[board[i]]++;
        }
        for (int i = 1; i < players.length; i++) {
            colors[players[i]]++;
        }

        int myc = players[0];
        int op = players.length - 1;
        int max = argmax(colors, h);
        if (myc == h) {
            if (colors[max] < colors[h] - op) {
                return except(-1, board);
            } else if (colors[max] > 0 && colors[max] < colors[h] + 1 - op) {
                return except(h, board);
            } else if (colors[max] > 0 && colors[max] - 1 < colors[h] + 1 - op && maxCount(colors, h) == 1) {
                return only(max, board);
            } else {
                return only(-1, board);
            }
        } else {
            if (colors[max] == colors[myc]) {
                max = myc;
            }
            if (colors[max] + 1 < colors[h] - 1 - op) {
                return except(-1, board);
            } else if (colors[max] > 0 && colors[max] + 1 < colors[h] - op) {
                return except(h, board);
            } else if (colors[max] > 0 && colors[max] < colors[h] - op && maxCount(colors, h) == 1) {
                return only(max, board);
            } else {
                return only(-1, board);
            }
        }
    }

    private List<Integer> except(int c, int[] board) {
        List<Integer> result = new ArrayList<>();
        for (int i = 0; i < board.length; i++) {
            if (board[i] != c) {
                result.add(i);
            }
        }
        return result;
    }

    private List<Integer> only(int c, int[] board) {
        List<Integer> result = new ArrayList<>();
        for (int i = 0; i < board.length; i++) {
            if (board[i] == c) {
                result.add(i);
            }
        }
        return result;
    }

    public static void main(String[] args) throws Exception {
        in = new Scanner(new File("kabaleo.in"));
        out = new PrintWriter("kabaleo.out");

        new kabaleo_gk_wa_cases().run();

        in.close();
        out.close();
    }
}
