#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, v[5050], q, x;
  scanf("%d %d", &n, &k);
  for (int i = 0, __l = n; i < __l; ++i) scanf("%d", &v[i]);
  scanf("%d", &q);
  while (q--) {
    scanf("%d", &x);
    int ans = -1;
    for (int amt = 1, __l = k; amt <= __l; ++amt) {
      for (int c = 0, __l = n; c < __l; ++c) {
        if (x == amt * v[c]) {
          ans = amt;
          break;
        }
        for (int i = 1, __l = amt - 1; i <= __l; ++i) {
          int tmp = x - i * v[c];
          if (tmp < 0) break;
          if (tmp % (amt - i) == 0) {
            tmp /= (amt - i);
            if (binary_search(v, v + n, tmp)) ans = amt;
          }
        }
        if (ans != -1) break;
      }
      if (ans != -1) break;
    }
    printf("%d\n", ans);
  }
  return 0;
}
