#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, d[100], v[100], kk[100], kol, mkol = 1000, kl = 0;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> d[i];
  for (int i = 0; i < k; i++) cin >> v[i];
  for (int i = 0; i < m; i++) {
    kol = 0;
    for (int j = 0; j < k; j++)
      if (v[j] % d[i] == 0) kol++;
    mkol = min(mkol, kol);
    kk[i] = kol;
  }
  for (int i = 0; i < m; i++)
    if (kk[i] == mkol) kl++;
  cout << kl << endl;
  for (int i = 0; i < m; i++)
    if (kk[i] == mkol) cout << i + 1 << " ";
  return 0;
}
