#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int d[N], cnt[N];
vector<int> v;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) cin >> d[i];
  for (int i = 0; i < k; i++) {
    int x;
    cin >> x;
    for (int j = 0; j < m; j++)
      if ((d[j] <= n || (d[j] > n && x == (n + d[j] - 1) / d[j] * d[j])) &&
          x % d[j] == 0)
        cnt[j]++;
  }
  int mini = *min_element(cnt, cnt + m);
  for (int i = 0; i < m; i++)
    if (cnt[i] == mini) v.push_back(i);
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] + 1 << ' ';
}
