#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, c[101], d[101], e[101], min = 100, count = 0;
  cin >> n >> m >> k;
  for (int i = 1; i <= m; i++) {
    cin >> d[i];
    c[i] = 0;
  }
  for (int i = 1; i <= k; i++) cin >> e[i];
  for (int i = 1; i <= m; i++)
    for (int j = 1; j <= k; j++)
      if (e[j] % d[i] == 0) c[i]++;
  for (int i = 1; i <= m; i++) {
    if (c[i] < min) {
      min = c[i];
      count = 1;
      continue;
    }
    if (c[i] == min) count++;
  }
  cout << count << "\n";
  for (int i = 1; i <= m; i++)
    if (c[i] == min) cout << i << ' ';
  return 0;
}
