#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, k;
  while (cin >> n >> m >> k) {
    vector<long long> v, v1, b;
    vector<pair<long long, long long> > a;
    for (int i = 0; i < m; i++) {
      long long p;
      cin >> p;
      v.push_back(p);
    }
    for (int i = 0; i < k; i++) {
      long long p;
      cin >> p;
      v1.push_back(p);
    }
    sort(v1.begin(), v1.end());
    long long p = v1[0];
    for (int i = 0; i < m; i++) {
      long long c = 0;
      for (int j = 0; j < k; j++) {
        if (v1[j] % v[i] == 0) c++;
      }
      a.push_back(make_pair(c, i + 1));
    }
    sort(a.begin(), a.end());
    long long q = a[0].first;
    b.push_back(a[0].second);
    for (int i = 1; i < a.size(); i++) {
      if (a[i].first == q) b.push_back(a[i].second);
    }
    cout << b.size() << endl;
    for (int i = 0; i < b.size(); i++) {
      cout << b[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
