#include <bits/stdc++.h>
using namespace std;
void solve() {}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> frogs(m);
  for (int i = 0; i < m; ++i) cin >> frogs[i];
  vector<int> toes(k);
  for (int i = 0; i < k; ++i) cin >> toes[i];
  int squish = k + 1;
  vector<int> squishes(m);
  for (int i = 0; i < m; ++i) {
    int count = 0;
    for (int j = 0; j < k; ++j) {
      if (toes[j] % frogs[i] == 0) ++count;
    }
    squishes[i] = count;
    squish = min(squish, count);
  }
  vector<int> store;
  int count = 0;
  for (int i = 0; i < m; ++i) {
    if (squishes[i] == squish) {
      ++count;
      store.push_back(i);
    }
  }
  cout << count << endl;
  for (int i = 0; i < count; ++i) {
    cout << store[i] + 1 << " ";
  }
}
