#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[110], b[110];
  for (int i = 0; i < m; ++i) cin >> a[i];
  for (int i = 0; i < k; ++i) cin >> b[i];
  int mink = n + 5;
  vector<int> res;
  for (int i = 0; i < m; ++i) {
    int cnt = 0;
    for (int j = 0; j < k; ++j)
      if (b[j] % a[i] == 0) ++cnt;
    if (cnt == mink) res.push_back(i);
    if (cnt < mink) mink = cnt, res.clear(), res.push_back(i);
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); ++i) cout << res[i] + 1 << " ";
  return 0;
}
