#include <bits/stdc++.h>
using namespace std;
int aa[105], bb[105], ans[105];
int main() {
  int n, m, k, rs = 105;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= m; i++) scanf("%d", &aa[i]);
  for (int i = 1; i <= k; i++) scanf("%d", &bb[i]);
  for (int i = 1; i <= k; i++) {
    for (int j = 1; j <= m; j++) {
      if (bb[i] % aa[j] == 0) ans[j]++;
    }
  }
  k = 0;
  for (int i = 1; i <= m; i++) {
    if (ans[i] < rs) {
      rs = ans[i];
      k = 1;
    } else if (ans[i] == rs)
      k++;
  }
  printf("%d\n", k);
  for (int i = 1; i <= m; i++)
    if (ans[i] == rs) printf("%d ", i);
  return 0;
}
