#include <bits/stdc++.h>
using namespace std;
int d[100];
int w[100];
int out[100];
int main() {
  int n, m, k;
  while (scanf("%d%d%d", &n, &m, &k) != EOF) {
    for (int i = 0; i < m; i++) {
      scanf("%d", &d[i]);
    }
    for (int i = 0; i < k; i++) {
      scanf("%d", &w[i]);
    }
    int io = 0;
    int minNum = 999999;
    for (int i = 0; i < m; i++) {
      int cnt = 0;
      for (int j = 0; j < k; j++) {
        if ((w[j] % d[i]) == 0) {
          cnt++;
        }
      }
      if (cnt < minNum) {
        io = 0;
        out[io++] = i + 1;
        minNum = cnt;
      } else if (cnt == minNum) {
        out[io++] = i + 1;
      }
    }
    printf("%d\n", io);
    for (int i = 0; i < io - 1; i++) {
      printf("%d ", out[i]);
    }
    printf("%d\n", out[io - 1]);
  }
  return 0;
}
