#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int IINF = 1000000000;
const double PI = acos(-1.0);
const long long LINF = 6000000000000000000LL;
bool satisfy(long long D, long long pos) { return pos % D == 0; }
int main() {
  int n, m, k;
  while (scanf("%d%d%d", &n, &m, &k) == 3) {
    vector<int> d, f;
    for (int i = 0; i < m; ++i) {
      int x;
      scanf("%d", &x);
      d.push_back(x);
    }
    for (int i = 0; i < k; ++i) {
      int x;
      scanf("%d", &x);
      f.push_back(x);
    }
    vector<pair<int, int> > answer;
    for (int i = 0; i < m; ++i) {
      long long D = d[i];
      int cnt = 0;
      for (int j = 0; j < k; ++j) {
        if (satisfy(D, f[j])) {
          ++cnt;
        }
      }
      answer.push_back(make_pair(cnt, i));
    }
    vector<int> indices;
    sort(answer.begin(), answer.end());
    int val = answer[0].first, it = 0;
    while (it < answer.size() && answer[it].first == val) {
      indices.push_back(answer[it].second + 1);
      ++it;
    }
    printf("%d\n", indices.size());
    for (int ind : indices) {
      printf("%d ", ind);
    }
    printf("\n");
  }
  return 0;
}
