#include <bits/stdc++.h>
using namespace std;
long long a[5004], n, k;
int mod = 10000;
map<long long, long long> mapa[10000];
int solve(int val) {
  long long ans = (1 << 30), cant, id;
  for (int i = 0; i < n; i++) {
    if (val % a[i] == 0 && val / a[i] <= k) ans = min(ans, val / a[i]);
    for (int j = 0; j <= k && a[i] * j <= val; j++) {
      cant = val - a[i] * j;
      id = cant % mod;
      if (mapa[id].find(cant) != mapa[id].end()) {
        cant = j + mapa[id][cant];
        if (cant <= k && ans > cant) ans = cant;
      }
    }
  }
  return ans;
}
int main() {
  while (cin >> n >> k) {
    long long id, cant;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      for (long long j = 0; j <= k; j++) {
        cant = a[i] * j;
        id = cant % mod;
        if (mapa[id].find(cant) != mapa[id].end())
          mapa[id][cant] = min(mapa[id][cant], j);
        else
          mapa[id][cant] = j;
      }
    }
    int q, M, ans;
    cin >> q;
    for (int i = 0; i < q; i++) {
      cin >> M;
      ans = solve(M);
      if (ans < (1 << 30))
        cout << solve(M) << endl;
      else
        puts("-1");
    }
  }
}
