#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int SIZE(T& n) {
  return n.size();
}
template <class T>
void OUT(const T& n) {
  for (unsigned int i = 0; i < n.size(); ++i) {
    cout << n[i] << " ";
  }
  cout << endl;
}
int toInt(string s) {
  int r = 0;
  stringstream sin(s);
  sin >> r;
  return r;
}
template <class T>
string toString(T n) {
  ostringstream ost;
  ost << n;
  ost.flush();
  return ost.str();
}
class PacifistFrogs {
 public:
  vector<int> frogs(int N, vector<int> frogs, vector<int> mosquitoes) {
    int number = 0, res = 1234567890;
    vector<pair<int, int> > ans;
    vector<int> output;
    for (int i = 0; i < frogs.size(); ++i) {
      int number = 0;
      for (int j = 0; j < mosquitoes.size(); ++j) {
        if (mosquitoes[j] % frogs[i] == 0) {
          number++;
        }
      }
      ans.push_back(make_pair(number, i + 1));
      res = min(res, number);
    }
    for (int i = 0; i < ans.size(); ++i) {
      if (ans[i].first == res) output.push_back(ans[i].second);
    }
    return output;
  }
};
int n, m, k, a;
int main() {
  cin >> n >> m >> k;
  vector<int> frogs, mosquitoes, res;
  for (int i = 0; i < m; ++i) {
    cin >> a;
    frogs.push_back(a);
  }
  for (int i = 0; i < k; ++i) {
    cin >> a;
    mosquitoes.push_back(a);
  }
  PacifistFrogs FROG;
  res = FROG.frogs(n, frogs, mosquitoes);
  cout << res.size() << endl;
  OUT(res);
  return 0;
}
