#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int d[1 << 10];
int c[1 << 10];
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i < (int)(m); i++) scanf("%d", &d[i]);
  for (int i = 0; i < (int)(k); i++) {
    scanf("%d", &c[i]);
  }
  vector<int> res;
  int cnt = 1 << 30;
  for (int i = 0; i < (int)(m); i++) {
    int D = d[i];
    int r = 0;
    for (int j = 0; j < (int)(k); j++) {
      if (c[j] <= n && (long long)c[j] % D == 0) r++;
    }
    if (r < cnt) {
      res.clear();
      cnt = r;
    }
    if (r == cnt) {
      res.push_back(i);
    }
  }
  printf("%d\n", res.size());
  for (int i = 0; i < (int)(res.size()); i++) {
    if (i) printf(" ");
    printf("%d", res[i] + 1);
  }
  printf("\n");
  return 0;
}
