#include <bits/stdc++.h>
const int maxn = 100;
long ds[maxn];
long hs[maxn];
long solu[maxn];
long soluNum;
long min;
int n, k, m;
int main() {
  using std::cin;
  using std::cout;
  cin >> n >> k >> m;
  int i, j;
  for (i = 0; i < k; i++) cin >> ds[i];
  for (i = 0; i < m; i++) cin >> hs[i];
  min = m + 1;
  soluNum = 1;
  for (i = 0; i < k; i++) {
    long sum = 0;
    for (j = 0; j < m; j++) {
      if (hs[j] % ds[i] == 0) sum++;
    }
    if (sum < min) {
      soluNum = 1;
      solu[0] = i;
      min = sum;
    } else if (sum == min) {
      solu[soluNum++] = i;
    }
  }
  cout << soluNum << '\n';
  for (i = 0; i < soluNum; i++) cout << solu[i] + 1 << ' ';
  cout << '\n';
  return 0;
}
