#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, f, mc, d;
  cin >> n >> m >> k;
  int a[100], b[100], c[100];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < m; i++) {
    f = 0;
    for (int j = 0; j < k; j++) {
      if (b[j] % a[i] == 0) f++;
    }
    c[i] = f;
  }
  mc = c[0];
  d = 0;
  for (int i = 0; i < m; i++)
    if (c[i] < mc) mc = c[i];
  for (int i = 0; i < m; i++)
    if (c[i] == mc) d++;
  cout << d << endl;
  for (int i = 0; i < m; i++)
    if (c[i] == mc) cout << i + 1 << " ";
}
