#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, m, k, dist, min_count, num;
  vector<int> len_jumps, mosqs, mosq_count, result;
  cin >> n >> m >> k;
  len_jumps.resize(m);
  mosqs.resize(k);
  mosq_count.resize(m);
  for (i = 0; i < m; i++) {
    cin >> len_jumps[i];
    mosq_count[i] = 0;
  }
  for (i = 0; i < k; i++) {
    cin >> mosqs[i];
  }
  for (i = 0; i < m; i++) {
    for (j = 0; j < k; j++) {
      if (mosqs[j] % len_jumps[i] == 0) {
        mosq_count[i]++;
      }
    }
  }
  min_count = n;
  for (i = 0; i < m; i++) {
    if (mosq_count[i] < min_count) {
      min_count = mosq_count[i];
    }
  }
  num = 0;
  for (i = 0; i < m; i++) {
    if (mosq_count[i] == min_count) {
      num++;
      result.push_back(i + 1);
    }
  }
  cout << num << endl;
  for (i = 0; i < result.size() - 1; i++) {
    cout << result[i] << " ";
  }
  cout << result[result.size() - 1] << endl;
  return 0;
}
