#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9 + 5757;
template <class T>
inline void umax(T &a, T b) {
  if (a < b) a = b;
}
template <class T>
inline void umin(T &a, T b) {
  if (a > b) a = b;
}
template <class T>
inline T abs(T a) {
  return a > 0 ? a : -a;
}
template <class T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
inline int read() {
  int x;
  scanf(" %d", &x);
  return x;
}
const int N = 1010;
int d[N], cnt[N];
int main() {
  int n = read(), m = read(), k = read();
  for (int i = 1; i <= m; i++) {
    d[i] = read();
  }
  for (int i = 1; i <= k; i++) {
    int a = read();
    for (int j = 1; j <= m; j++)
      if (a % d[j] == 0) cnt[j]++;
  }
  int minimal = inf;
  vector<int> ans;
  for (int i = 1; i <= m; i++) {
    if (cnt[i] < minimal) {
      minimal = cnt[i];
      ans.clear();
      ans.push_back(i);
    } else if (cnt[i] == minimal) {
      ans.push_back(i);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); ++i) printf("%d ", ans[i]);
  return 0;
}
