#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> d(m);
  for (int &i : d) cin >> i;
  vector<int> p(k);
  for (int &i : p) cin >> i;
  int mn = 2e9;
  vector<int> ans;
  for (int i = 0; i < m; i++) {
    int cnt = 0;
    for (int j = 0; j < k; j++) cnt += !(p[j] % d[i]);
    if (cnt < mn)
      mn = cnt, ans = {i + 1};
    else if (cnt == mn)
      ans.push_back(i + 1);
    else
      ;
  }
  cout << ans.size() << '\n';
  for (int i : ans) cout << i << ' ';
  cout << '\n';
  return 0;
}
