#include <bits/stdc++.h>
int main() {
  int m, k, i, j, min = 10000000;
  long long n;
  scanf("%lld", &n);
  scanf("%d", &m);
  scanf("%d", &k);
  int *c, *d;
  c = (int *)malloc((m + 1) * sizeof(int));
  d = (int *)malloc((k + 1) * sizeof(int));
  for (i = 1; i <= m; i++) scanf("%d", &c[i]);
  for (i = 1; i <= k; i++) scanf("%d", &d[i]);
  int t = 0;
  int *f;
  f = (int *)malloc((m + 1) * sizeof(int));
  for (i = 1; i <= m; i++) {
    t = 0;
    for (j = 1; j <= k; j++) {
      if (d[j] % c[i] == 0) t++;
    }
    f[i] = t;
  }
  min = 1000000000;
  t = 0;
  for (i = 1; i <= m; i++)
    if (f[i] <= min) {
      min = f[i];
    }
  for (i = 1; i <= m; i++)
    if (min == f[i]) t++;
  printf("%d\n", t);
  for (i = 1; i <= m; i++)
    if (min == f[i]) printf("%d ", i);
  getchar();
  getchar();
  return 0;
}
