#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> d(m), ans(m);
  vector<int> kom(k);
  for (auto &i : d) cin >> i;
  for (auto &i : kom) cin >> i;
  int mn = 1e9;
  for (int i = 0; i < m; i++) {
    int cur = 0;
    for (auto j : kom) {
      if (j % d[i] == 0) cur++;
    }
    ans[i] = cur;
    mn = min(mn, cur);
  }
  int count = 0;
  for (auto i : ans) {
    if (i == mn) count++;
  }
  cout << count << endl;
  for (int i = 0; i < m; i++) {
    if (ans[i] == mn) cout << i + 1 << " ";
  }
  return 0;
}
