#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  vector<int> frogs;
  for (int i = 0; i < m; i++) {
    int temp;
    cin >> temp;
    frogs.push_back(temp);
  }
  vector<int> mosq;
  for (int i = 0; i < k; i++) {
    int temp;
    cin >> temp;
    mosq.push_back(temp);
  }
  int min = 1000010000;
  int array[1000];
  for (int i = 0; i < m; i++) {
    int count = 0;
    int flag = 0;
    for (int j = 0; j < k; j++) {
      if (mosq[j] % frogs[i] == 0) count++;
      if (mosq[j] >= frogs[i]) flag = 1;
    }
    if (count < min) min = count;
    array[i] = count;
    if (flag == 0) {
      min = 0;
      array[i] = 0;
    }
  }
  int count = 0;
  for (int i = 0; i < m; i++)
    if (array[i] == min) count++;
  cout << count << endl;
  for (int i = 0; i < m; i++)
    if (array[i] == min) cout << i + 1 << " ";
  return 0;
}
