#include <bits/stdc++.h>
using namespace std;
int d[100], x[100], ct[100];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> d[i];
  for (int i = 0; i < k; i++) cin >> x[i];
  int mn = 200;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < k; j++)
      if (x[j] % d[i] == 0) ct[i]++;
    mn = min(mn, ct[i]);
  }
  int r = 0;
  for (int i = 0; i < m; i++)
    if (ct[i] == mn) r++;
  cout << r << endl;
  for (int i = 0; i < m; i++)
    if (ct[i] == mn) cout << i + 1 << ' ';
  cout << endl;
}
