#include <bits/stdc++.h>
using namespace std;
int jump[200], dis[200], sum[200];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) cin >> jump[i];
  for (int i = 0; i < k; ++i) cin >> dis[i];
  for (int i = 0; i < m; ++i) {
    int now = 0;
    for (int j = 0; j < k; ++j)
      if (dis[j] % jump[i] == 0) ++now;
    sum[i] = now;
  }
  int minn = 0x7fffffff;
  for (int i = 0; i < m; ++i) minn = min(minn, sum[i]);
  int num = 0;
  for (int i = 0; i < m; ++i)
    if (minn == sum[i]) ++num;
  cout << num << endl;
  int v = 0;
  for (int i = 0; i < m; ++i) {
    if (minn == sum[i]) {
      if (v == 0) {
        cout << i + 1;
        v = 1;
      } else
        cout << ' ' << i + 1;
    }
  }
  cout << endl;
  return 0;
}
