#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  int d[200];
  int len[200];
  while (~scanf("%d%d%d", &n, &m, &k)) {
    memset(d, 0, sizeof(d));
    memset(len, 0, sizeof(len));
    for (int i = 1; i <= m; ++i) scanf("%d", &len[i]);
    int point;
    for (int i = 0; i < k; ++i) {
      scanf("%d", &point);
      for (int j = 1; j <= m; ++j) {
        if (point % len[j] == 0) d[j]++;
      }
    }
    int mins = k + 1;
    int ans = 0;
    int mark = 0;
    for (int i = 1; i <= m; ++i)
      if (d[i] < mins) mins = d[i], mark = i;
    for (int i = 1; i <= m; ++i) {
      if (d[i] == mins) ans++;
    }
    printf("%d\n", ans);
    for (int i = 1; i <= m; ++i) {
      if (d[i] == mins && i == mark)
        printf("%d", i);
      else if (d[i] == mins && i != mark)
        printf(" %d", i);
    }
  }
  return 0;
}
