#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> a(m), b(k);
  for (int &i : a) cin >> i;
  for (int &i : b) cin >> i;
  int minimal = INT_MAX;
  vector<int> arr(m);
  for (int i = 0; i < m; i++) {
    int cur = 0;
    for (int j = 0; j < k; j++) {
      if (b[j] % a[i] == 0 and b[j] <= n) cur++;
    }
    if (minimal > cur) minimal = cur;
    arr[i] = cur;
  }
  vector<int> ans;
  for (int i = 0; i < m; i++)
    if (arr[i] == minimal) ans.push_back(i + 1);
  cout << ans.size() << endl;
  for (int i : ans) cout << i << " ";
  cout << endl;
  return 0;
}
