#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353LL;
int n, k;
int a[5002];
int q;
bool b[10000002];
int main() {
  cin >> n >> k;
  memset(b, false, sizeof(b));
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    b[a[i]] = true;
  }
  cin >> q;
  for (int i = 1; i <= q; ++i) {
    long long x;
    scanf("%lld", &x);
    int ans = -1;
    for (int j = 1; j <= n; ++j) {
      for (int n1 = 0; n1 <= k; ++n1) {
        long long y = (long long)a[j] * (long long)n1;
        if (y > x) break;
        long long det = x - y;
        if (det == 0) {
          ans = (ans < 0 ? n1 : min(ans, n1));
          continue;
        }
        for (int n2 = 1; n2 + n1 <= k; ++n2) {
          if (det % n2 == 0 && det / n2 <= 10000000 && b[det / n2]) {
            ans = (ans < 0 ? n1 + n2 : min(ans, n1 + n2));
          }
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}
