#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000005;
const int MAXV = 10000005;
bitset<MAXV> B;
int n, k, q;
int a[5555];
int main(void) {
  scanf("%d%d", &n, &k);
  for (int i = (0); i < (n); ++i) scanf("%d", a + i), B[a[i]] = 1;
  scanf("%d", &q);
  for (int i = (0); i < (q); ++i) {
    int x;
    scanf("%d", &x);
    int sol = inf;
    for (int j = (0); j < (n); ++j) {
      for (int p = 1; p <= k && x - p * a[j] >= 0; ++p) {
        int y = x - p * a[j];
        if (y == 0) sol = min(sol, p);
        for (int q = 1; q <= k - p; ++q) {
          if (y % q != 0) continue;
          if (y / q >= MAXV) continue;
          if (B[y / q]) sol = min(sol, p + q);
        }
      }
    }
    if (sol == inf)
      puts("-1");
    else
      printf("%d\n", sol);
  }
  return 0;
}
