#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> ans(m);
  vector<int> komar(k), d(m);
  for (int(i) = 0; (i) < m; (i)++) {
    scanf("%d", &d[i]);
  }
  for (int(i) = 0; (i) < k; (i)++) {
    scanf("%d", &komar[i]);
    for (int j = 0; j < m; j++) {
      if (komar[i] % d[j] == 0) ans[j]++;
    }
  }
  int mn = (int)1e9;
  for (int(i) = 0; (i) < m; (i)++) {
    mn = min(mn, ans[i]);
  }
  vector<int> tmp;
  for (int(i) = 0; (i) < m; (i)++) {
    if (ans[i] == mn) tmp.push_back(i + 1);
  }
  cout << tmp.size() << endl;
  for (int(i) = 0; (i) < tmp.size(); (i)++) printf("%d ", tmp[i]);
  return 0;
}
