#include <bits/stdc++.h>
using namespace std;
int n, m, k, d[101], kom[101], res[101];
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i < m; ++i) cin >> d[i];
  for (int i = 0; i < k; ++i) cin >> kom[i];
  memset(res, 0, sizeof res);
  for (int i = 0; i < m; ++i)
    for (int j = 0; j < k; ++j)
      if (kom[j] % d[i] == 0) ++res[i];
  int minn = res[0];
  for (int i = 0; i < m; ++i) minn = min(minn, res[i]);
  int kol = 0;
  for (int i = 0; i < m; ++i)
    if (res[i] == minn) ++kol;
  cout << kol << endl;
  for (int i = 0; i < m; ++i)
    if (res[i] == minn) cout << i + 1 << ' ';
  return 0;
}
