#include <bits/stdc++.h>
using namespace std;
int cnt[110];
int d[110], bad[110];
int main(void) {
  int N, M, K, i, j;
  cin >> N >> M >> K;
  for ((i) = 0; (i) < (int)(M); (i)++) cin >> d[i];
  for ((i) = 0; (i) < (int)(K); (i)++) cin >> bad[i];
  int small = N;
  for ((i) = 0; (i) < (int)(M); (i)++) {
    for ((j) = 0; (j) < (int)(K); (j)++)
      if (bad[j] % d[i] == 0) cnt[i]++;
    small = min(small, cnt[i]);
  }
  vector<int> ans;
  for ((i) = 0; (i) < (int)(M); (i)++)
    if (cnt[i] == small) ans.push_back(i + 1);
  cout << ans.size() << endl;
  for ((i) = 0; (i) < (int)(ans.size()); (i)++) {
    cout << ans[i];
    if (i == ans.size() - 1)
      cout << endl;
    else
      cout << ' ';
  }
  return 0;
}
