#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  int cost[105], minCost;
  int d[105], r[105];
  int cnt;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    cin >> d[i];
  }
  for (int i = 0; i < k; i++) {
    cin >> r[i];
  }
  minCost = 1000000005;
  cnt = -1;
  for (int i = 0; i < m; i++) {
    cost[i] = 0;
    for (int j = 0; j < k; j++) {
      if (r[j] % d[i] == 0) cost[i]++;
    }
    if (cost[i] < minCost) {
      minCost = cost[i];
      cnt = 1;
    } else if (cost[i] == minCost) {
      cnt++;
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < m; i++) {
    if (cost[i] == minCost) cout << i + 1 << " ";
  }
  cout << endl;
  return 0;
}
