#include <bits/stdc++.h>
using namespace std;
vector<int> ANS;
long long i, sol, j, n, m, k, frog[110], mosq[110], ans[110];
int main() {
  cin >> n >> m >> k;
  for (i = 1; i <= m; i++) cin >> frog[i];
  for (i = 1; i <= k; i++) cin >> mosq[i];
  for (i = 1; i <= k; i++)
    for (j = 1; j <= m; j++)
      if (mosq[i] % frog[j] == 0) ans[j]++;
  sol = 1000000;
  for (i = 1; i <= m; i++)
    if (ans[i] < sol) {
      ANS.resize(0);
      ANS.push_back(i);
      sol = ans[i];
    } else if (ans[i] == sol)
      ANS.push_back(i);
  cout << ANS.size() << '\n';
  sort(ANS.begin(), ANS.end());
  for (auto it : ANS) cout << it << ' ';
  return 0;
}
