#include <bits/stdc++.h>
using namespace std;
inline void read(register int *n) {
  register char c;
  *n = 0;
  do {
    c = getchar();
  } while (c < '0' || c > '9');
  do {
    *n = c - '0' + *n * 10;
    c = getchar();
  } while (c >= '0' && c <= '9');
}
int main(int argv, char **argc) {
  ios::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> V(m), U(k);
  for (register int i = (0); i < (int)(m); ++i) cin >> V[i];
  for (register int i = (0); i < (int)(k); ++i) cin >> U[i];
  int best = 1000 * 1000 * 1000;
  vector<int> res;
  for (register int rep = (0); rep < (int)(m); ++rep) {
    int cnt = 0;
    for (register int i = (0); i < (int)(k); ++i)
      if (U[i] % V[rep] == 0) cnt++;
    if (cnt <= best) {
      if (cnt < best) res.clear();
      best = cnt;
      res.push_back(rep + 1);
    }
  }
  cout << ((int)(res).size()) << endl;
  for (register int i = (0); i < (int)(((int)(res).size())); ++i)
    cout << res[i] << " ";
  return 0;
}
