#include <bits/stdc++.h>
using namespace std;
int N, m, k, komar, mx, lag[101], pil_lag[101], bst = 1000000;
vector<int> ans;
int main() {
  cin >> N >> m >> k;
  for (int i = 0; i < m; ++i) {
    cin >> lag[i];
  }
  for (int i = 0; i < k; ++i) {
    cin >> komar;
    for (int j = 0; j < m; ++j)
      if (komar % lag[j] == 0) pil_lag[j]++;
  }
  for (int i = 0; i < m; ++i) {
    if (pil_lag[i] < bst) {
      bst = pil_lag[i];
    }
  }
  for (int i = 0; i < m; ++i) {
    if (pil_lag[i] == bst) {
      ans.push_back(i + 1);
    }
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << ' ';
}
