#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* const argv[]) {
  int n, m, k, d[100], r[100], i, j, count = 0, min = 200;
  int c[100];
  cin >> n >> m >> k;
  for (i = 0; i < m; i++) {
    cin >> d[i];
    c[i] = 0;
  }
  for (i = 0; i < k; i++) {
    cin >> r[i];
  }
  for (i = 0; i < m; i++) {
    for (j = 0; j < k; j++) {
      if (r[j] % d[i] == 0) {
        c[i]++;
      }
    }
    if (c[i] < min) {
      min = c[i];
      count = 0;
    } else if (c[i] == min) {
      count++;
    }
  }
  cout << count + 1 << endl;
  for (i = 0; i < m; i++) {
    if (c[i] == min) {
      cout << i + 1 << " ";
    }
  }
  return 0;
}
