#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, a[200], b[200], ans2 = 500;
  vector<int> ans;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> a[i];
  for (int i = 0; i < k; i++) cin >> b[i];
  for (int i = 0; i < m; i++) {
    int o = 0;
    for (int j = 0; j < k; j++)
      if (b[j] % a[i] == 0) o++;
    if (o < ans2) {
      ans2 = o;
      ans.clear();
      ans.push_back(i + 1);
    } else if (o == ans2)
      ans.push_back(i + 1);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
