#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long llINF = 10000000000000ll;
const int SWAG = 228;
const int LEET = 1337;
vector<int> dist, mosquito, fom, ans;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) {
    int x;
    cin >> x;
    dist.push_back(x);
  }
  for (int i = 0; i < k; ++i) {
    int x;
    cin >> x;
    mosquito.push_back(x);
  }
  int minn = INF;
  for (int i = 0; i < m; ++i) {
    int nofmos = 0;
    for (int j = 0; j < k; ++j)
      if (mosquito[j] % dist[i] == 0) nofmos++;
    fom.push_back(nofmos);
    minn = min(minn, nofmos);
  }
  for (int i = 0; i < m; ++i)
    if (fom[i] == minn) ans.push_back(i);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] + 1 << " ";
  return 0;
}
