#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, F, M;
  cin >> N >> F >> M;
  int FR[200], MO[200];
  vector<int> V;
  int mi = 10000;
  for (int i = 0; i < F; ++i) cin >> FR[i];
  for (int j = 0; j < M; ++j) cin >> MO[j];
  for (int i = 0; i < F; ++i) {
    int cnt = 0;
    for (int j = 0; j < M; ++j)
      if (MO[j] % FR[i] == 0) cnt++;
    if (cnt < mi) {
      V.clear();
      V.push_back(i + 1);
      mi = cnt;
    } else if (mi == cnt)
      V.push_back(i + 1);
  }
  cout << V.size() << endl;
  for (int i = 0; i < V.size(); ++i) {
    if (i < V.size() - 1)
      cout << V[i] << " ";
    else
      cout << V[i] << endl;
  }
}
