#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, min = INT_MAX, no_of_frogs = 0, total, temp;
  cin >> n >> m >> k;
  vector<int> frogs, mos, min_frogs;
  for (int i = 0; i < m; i++) {
    cin >> temp;
    frogs.push_back(temp);
  }
  for (int i = 0; i < k; i++) {
    cin >> temp;
    mos.push_back(temp);
  }
  for (int i = 0; i < m; i++) {
    total = 0;
    for (int j = 0; j < k; j++) {
      if (mos[j] % frogs[i] == 0) {
        total++;
      }
    }
    if (total < min) {
      min = total;
    }
    min_frogs.push_back(total);
  }
  for (int i = 0; i < m; i++) {
    if (min_frogs[i] == min) {
      no_of_frogs++;
    }
  }
  cout << no_of_frogs << endl;
  for (int i = 0; i < m; i++) {
    if (min_frogs[i] == min) {
      cout << i + 1 << "  ";
    }
  }
  cout << endl;
  return 0;
}
