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

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

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

        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() - 1;
        }

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

    List<Integer> solve(int c, int h, int[] board, int[] players) {
        if (board.length == 1) {
            if (players[players.length - 1] == h) {
                return Arrays.asList(0);
            } else {
                return Arrays.asList();
            }
        }

        int[] colors = new int[c + 1];
        for (int color : board) {
            colors[color]++;
        }

        for (int color : players) {
            colors[color]++;
        }

        int max1 = 0;
        int maxi1 = c;
        int max2 = 0;
        for (int i = 0; i < c; i++) {
            if (i != h) {
                int s = colors[i];
                if (max1 < s) {
                    max2 = max1;
                    max1 = s;
                    maxi1 = i;
                } else if (max2 < s) {
                    max2 = s;
                }
            }
        }

        int left = colors[h] - players.length + 1;
        int right = colors[maxi1];
        if (left - 1 > right) {
            return except(-1, board);
        } else if (left - 1 == right) {
            return except(h, board);
        } else if (left == right && max1 != max2) {
            return only(maxi1, board);
        } else {
            return only(-1, board);
        }
    }

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

    private List<Integer> except(int k, int[] board) {
        List<Integer> result = new ArrayList<>();
        for (int i = 0; i < board.length; i++) {
            if (board[i] != k) {
                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_ok_cases().run();

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