#include <bits/stdc++.h>
using namespace std;
int o, z, k;
int poz;
vector<pair<int, int> > skok;
int main() {
  scanf("%d%d%d", &o, &z, &k);
  skok.resize(z);
  int i, j, sol = 999999999;
  for (i = 0; i < z; ++i) {
    scanf("%d", &skok[i].first);
    skok[i].second = 0;
  }
  for (i = 0; i < k; ++i) {
    scanf("%d", &poz);
    for (j = 0; j < z; ++j) {
      if (!(poz % skok[j].first)) ++skok[j].second;
    }
  }
  vector<int> kand;
  for (i = 0; i < z; ++i)
    if (skok[i].second < sol) sol = skok[i].second;
  for (i = 0; i < z; ++i)
    if (skok[i].second == sol) kand.push_back(i + 1);
  printf("%d\n", kand.size());
  for (i = 0; i < kand.size(); ++i) printf("%d ", kand[i]);
  printf("\n");
  cin.get();
  cin.get();
  return 0;
}
