#include <bits/stdc++.h>
using LL = long long;
int n, K;
int A[5000 + 5];
std::unordered_set<int> uset;
const int INF = 0x3f3f3f3f;
int work(int x) {
  int ret = INF;
  for (int i = 0; i < n; ++i) {
    int cur = A[i];
    for (int j = 1; j <= K; ++j) {
      if (j > ret) break;
      if (j * cur > x) break;
      int tmp = x - j * cur;
      if (tmp == 0) {
        ret = std::min(ret, j);
      }
      for (int k = std::min(ret - j, K - j); k > 0; --k) {
        if (tmp % k == 0) {
          if (uset.find(tmp / k) != uset.end()) {
            ret = std::min(ret, j + k);
          }
        }
      }
    }
  }
  if (ret == INF) return -1;
  return ret;
}
int main() {
  scanf("%d%d", &n, &K);
  for (int i = 0; i < n; ++i) {
    scanf("%d", A + i);
    uset.insert(A[i]);
  }
  int nq;
  scanf("%d", &nq);
  while (nq--) {
    int x;
    scanf("%d", &x);
    printf("%d\n", work(x));
  }
}
