#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int frogs[m];
  int pashe[k];
  for (int i = 0; i < m; i++) cin >> frogs[i];
  for (int i = 0; i < k; i++) cin >> pashe[i];
  int leh[m];
  for (int i = 0; i < m; i++) {
    leh[i] = 0;
    for (int j = 0; j < k; j++) {
      if (pashe[j] % frogs[i] == 0) leh[i]++;
    }
  }
  vector<int> minimums;
  int minval = (-1u) / 2;
  for (int i = 0; i < m; i++) {
    if (leh[i] < minval) {
      minval = leh[i];
      minimums.resize(0);
      minimums.push_back(i);
    } else if (leh[i] == minval)
      minimums.push_back(i);
  }
  cout << minimums.size() << endl;
  if (minimums.size() != 0) {
    for (int i = 0; i < minimums.size() - 1; ++i)
      cout << minimums[i] + 1 << " ";
    cout << minimums[minimums.size() - 1] + 1 << endl;
  }
  return 0;
}
