#include <bits/stdc++.h>
using namespace std;
size_t casualties(size_t jump, const vector<size_t>& loc) {
  size_t ans = 0;
  for (size_t i = 0; i < loc.size(); ++i)
    if (loc[i] % jump == 0) ++ans;
  return ans;
}
int main() {
  size_t n, m, k;
  cin >> n >> m >> k;
  vector<size_t> jump(m), location(k);
  for (size_t i = 0; i < jump.size(); ++i) cin >> jump[i];
  for (size_t i = 0; i < location.size(); ++i) cin >> location[i];
  size_t min_casual = casualties(jump[0], location);
  for (size_t i = 0; i < jump.size(); ++i)
    min_casual = min(min_casual, casualties(jump[i], location));
  vector<size_t> ans;
  for (size_t i = 0; i < jump.size(); ++i)
    if (casualties(jump[i], location) == min_casual) ans.push_back(i + 1);
  cout << ans.size() << endl;
  for (size_t i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  return 0;
}
