#include <bits/stdc++.h>
using namespace std;
bool a[10001000] = {0};
int q[5010];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> q[i];
  for (int i = 1; i <= n; i++) a[q[i]] = 1;
  int w;
  cin >> w;
  int x;
  for (int z = 1; z <= w; z++) {
    cin >> x;
    int res = 100000;
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= k; j++) {
        int y = x - q[i] * j;
        if (y == 0) {
          res = min(res, j);
          break;
        }
        if (y < 0) break;
        for (int u = 1; u <= k; u++) {
          if (y % u == 0) {
            if (y / u > 10000000) continue;
            if (a[y / u] && y / u != q[i] && (u + j) <= k)
              res = min(res, j + u);
          }
        }
      }
    }
    if (res == 100000) res = -1;
    cout << res << endl;
  }
}
