#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k, l, arr[200] = {}, brr[200] = {}, crr[200] = {};
  scanf("%d %d %d", &n, &m, &k);
  for (i = 0; i < m; i++) scanf("%d", &arr[i]);
  for (i = 0; i < k; i++) scanf("%d", &brr[i]);
  for (i = 0; i < m; i++) {
    l = 0;
    for (j = 0; j < k; j++) {
      if (brr[j] % arr[i] == 0) l++;
    }
    crr[i] = l;
  }
  vector<pair<int, int> > v;
  for (i = 0; i < m; i++) v.push_back(make_pair(crr[i], i));
  sort(v.begin(), v.end());
  l = 0;
  n = v[0].first;
  i = 0;
  while (i < m && n == v[i].first) {
    l++;
    i++;
  }
  printf("%d\n", l);
  for (i = 0; i < l; i++) printf("%d ", v[i].second + 1);
}
