#include <bits/stdc++.h>
using namespace std;
int ans[110];
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int _d[110], _k[110];
  for (int i = 0; i < m; i++) cin >> _d[i];
  for (int i = 0; i < k; i++) cin >> _k[i];
  for (int i = 0; i < m; i++) {
    int t = 0;
    for (int j = 0; j < k; j++)
      if (_k[j] % _d[i] == 0) t++;
    ans[i] = t;
  }
  int t = 1 << 30;
  for (int i = 0; i < m; i++)
    if (ans[i] < t) t = ans[i];
  int cnt = 0;
  for (int i = 0; i < m; i++)
    if (ans[i] == t) cnt++;
  cout << cnt << endl;
  for (int i = 0; i < m; i++)
    if (ans[i] == t) cout << i + 1 << " ";
}
