#include <bits/stdc++.h>
using namespace std;
long long read_num() {
  long long num = 0;
  char ch;
  ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  do {
    num = num * 10 + (ch - '0');
    ch = getchar();
  } while (isdigit(ch));
  return num;
}
int main() {
  int n, m, k, d[100], v[100], kk[100], kol, mkol = 1000, kl = 0;
  n = read_num();
  m = read_num();
  k = read_num();
  for (int i = 0; i < m; i++) d[i] = read_num();
  for (int i = 0; i < k; i++) v[i] = read_num();
  for (int i = 0; i < m; i++) {
    kol = 0;
    for (int j = 0; j < k; j++)
      if (v[j] % d[i] == 0) kol++;
    mkol = min(mkol, kol);
    kk[i] = kol;
  }
  for (int i = 0; i < m; i++)
    if (kk[i] == mkol) kl++;
  printf("%d\n", kl);
  for (int i = 0; i < m; i++)
    if (kk[i] == mkol) printf("%d ", i + 1);
  return 0;
}
