#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
int frog[101], mosq[101];
int main() {
  int(n);
  scanf("%d", &(n));
  ;
  int(m);
  scanf("%d", &(m));
  ;
  int(k);
  scanf("%d", &(k));
  ;
  for (int(i) = 1; (i) <= (m); ++(i)) {
    int(a);
    scanf("%d", &(a));
    ;
    frog[i] = a;
  }
  for (int(i) = 1; (i) <= (k); ++(i)) {
    int(a);
    scanf("%d", &(a));
    ;
    mosq[i] = a;
  }
  int min = (int)1e9;
  vector<int> opt;
  for (int(i) = 1; (i) <= (m); ++(i)) {
    int kills = 0;
    for (int(j) = 1; (j) <= (k); ++(j)) {
      if (mosq[j] % frog[i] == 0) ++kills;
    }
    if (min == kills) {
      opt.push_back(i);
    } else if (min > kills) {
      opt.clear();
      opt.push_back(i);
      min = kills;
    }
  }
  pisz(opt.size());
  for (int(i) = 0; (i) < (opt.size()); ++(i)) printf("%d ", opt[i]);
}
