#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  scanf("%d%d%d", &n, &m, &k);
  int a[m + 1], b[k + 1], p[m + 1];
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    p[i] = 0;
  };
  for (int i = 0; i < k; i++) scanf("%d", &b[i]);
  for (int i = 0; i < m; i++)
    for (int j = 0; j < k; j++)
      if (b[j] % a[i] == 0) p[i]++;
  int ans = k + 1, size = 0;
  for (int i = 0; i < m; i++) ans = min(ans, p[i]);
  for (int i = 0; i < m; i++)
    if (ans == p[i]) size++;
  printf("%d\n", size);
  for (int i = 0; i < m; i++)
    if (p[i] == ans) printf("%d ", i + 1);
  return 0;
}
