#include <bits/stdc++.h>
using namespace std;
int frog[200], ans[200];
int main() {
  int n, f, m;
  cin >> n >> f >> m;
  for (int i = 0; i < f; i++) cin >> frog[i];
  while (m--) {
    int a;
    cin >> a;
    for (int i = 0; i < f; i++) ans[i] += (a % frog[i] == 0);
  }
  int mn = *min_element(ans, ans + f);
  int cnt = count(ans, ans + f, mn);
  cout << cnt << endl;
  for (int i = 0; i < f; i++)
    if (ans[i] == mn) cout << i + 1 << ' ';
  return 0;
}
