#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int d[100];
int q[100];
int y[100];
int main() {
  int i, j, k, p;
  scanf("%d%d%d", &n, &m, &k);
  for (i = 0; i < m; i++) scanf("%d", &d[i]);
  for (i = 0; i < k; i++) {
    scanf("%d", &q[i]);
  }
  int w = 0, z;
  for (i = 0; i < m; i++) {
    w = 0;
    for (j = 0; j < k; j++)
      if (q[j] % d[i] == 0) w++;
    y[i] = w;
  }
  int c = 1000000001;
  for (i = 0; i < m; i++)
    if (y[i] < c) c = y[i];
  int e = 0;
  for (i = 0; i < m; i++)
    if (y[i] == c) {
      e++;
    }
  printf("%d\n", e);
  for (i = 0; i < m; i++)
    if (y[i] == c) {
      printf("%d ", i + 1);
    }
  return 0;
}
