#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926535897932384626433832795;
int const inf = (int)1e9;
long long const inf64 = (long long)2e18;
const string task = "";
int const NMAX = 1010;
int n, m, k, p[NMAX], d[NMAX];
vector<int> ans;
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < (int)m; i++) cin >> d[i];
  for (int i = 0; i < (int)k; i++) cin >> p[i];
  int best = inf;
  ans.clear();
  for (int i = 0; i < (int)m; i++) {
    int now = 0;
    for (int j = 0; j < (int)k; j++)
      if ((p[j]) % d[i] == 0) now++;
    if (now < best) {
      ans.clear();
      best = now;
    }
    if (best == now) ans.push_back(i + 1);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
