#include <bits/stdc++.h>
using namespace std;
const int N = 11001000;
int m[N];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  vector<int> a(n);
  for (int(i) = 0; (i) < (int)(n); ++(i)) {
    scanf("%d", &a[i]);
    m[a[i]] = 1;
  }
  int q;
  scanf("%d", &q);
  while (q--) {
    int x;
    scanf("%d", &x);
    int ans = 0x3f3f3f3f;
    for (int(i) = 0; (i) < (int)(n); ++(i))
      for (int(j) = (int)(1); (j) <= (int)(k); ++(j)) {
        int s = a[i] * j;
        if (s > x) continue;
        s = x - s;
        if (s == 0) {
          ans = min(ans, j);
          continue;
        }
        for (int d = 1; d + j <= k; d++)
          if (s % d == 0 && s / d < N && m[s / d]) ans = min(ans, j + d);
      }
    printf("%d\n", ans == 0x3f3f3f3f ? -1 : ans);
  }
  return 0;
}
