#include <bits/stdc++.h>
using namespace std;
const int MaxN = (int)(1e5);
int d[MaxN], K[MaxN], q[MaxN];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) cin >> d[i];
  for (int i = 0; i < k; ++i) cin >> K[i];
  vector<int> v;
  for (int i = 0; i < m; ++i) {
    int l = d[i];
    int e = 0;
    for (int j = 0; j < k; ++j) {
      if (K[j] % l == 0) e++;
    }
    q[i] = e;
  }
  int p = *min_element(q, q + m);
  for (int i = 0; i < m; ++i)
    if (p == q[i]) v.push_back(i + 1);
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); ++i) cout << v[i] << " ";
  return 0;
}
