#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000;
int mcd(int m, int n) {
  int r = 1;
  while (r != 0) {
    r = m % n;
    m = n;
    n = r;
  }
  return (m);
}
int vals[MAXN];
set<int> posibles;
unordered_map<int, vector<pair<int, int>>> mcds2;
void solve(int q, int n, int k) {
  int ans = -1;
  for (int i = n - 1; i >= 0; i--) {
    int max_iter = q / vals[i];
    if (max_iter > k) continue;
    if (q % vals[i] == 0) {
      if (ans == -1 || max_iter < ans) ans = max_iter;
      continue;
    } else {
      for (int e = 1; e <= max_iter; e++) {
        int parcial = (q - vals[i] * e);
        for (int z = k - e; z >= 1; z--) {
          if (parcial % z == 0 && posibles.count(parcial / z)) {
            if (ans == -1 || e + z < ans) ans = e + z;
            continue;
          }
        }
      }
    }
  }
  cout << ans << endl;
}
void create_mcds(int n) {
  for (int e = 0; e < n - 1; e++) {
    for (int i = e + 1; i < n; i++) {
      int val = mcd(vals[i], vals[e]);
      unordered_map<int, vector<pair<int, int>>>::const_iterator got =
          mcds2.find(val);
      if (got == mcds2.end()) {
        mcds2[val] = vector<pair<int, int>>();
      }
      mcds2[val].push_back({i, e});
    }
  }
}
int get_num(int a, int b, int goal, int k) {
  if (max(a, b) * k < goal) return -1;
  if (b > a) swap(a, b);
  if (a >= b) {
    int cant = goal / a;
    for (int i = cant; i >= 0; i--) {
      if ((goal - i * a) % b == 0) {
        int ret = (goal - i * a) / b + i;
        if (ret > k) return -1;
        return ret;
      }
    }
  }
  return -1;
}
void answer(int q, int n, int k) {
  int ans = -1;
  for (auto it = mcds2.begin(); it != mcds2.end(); ++it) {
    if (q % it->first == 0) {
      for (int e = 0; e < it->second.size(); e++) {
        int val = get_num(vals[it->second[e].first], vals[it->second[e].second],
                          q, k);
        if (val != -1 && (val < ans || ans == -1)) ans = val;
      }
    }
  }
  cout << ans << endl;
}
int main() {
  int N, K, Q;
  cin >> N >> K;
  for (int e = 0; e < N; e++) {
    cin >> vals[e];
    posibles.insert(vals[e]);
  }
  create_mcds(N);
  cin >> Q;
  for (int r = 0; r < Q; r++) {
    int t;
    cin >> t;
    if (N > 1) {
      solve(t, N, K);
    } else {
      if (t % vals[0] == 0) {
        if (t / vals[0] <= K) {
          cout << t / vals[0] << endl;
        } else
          cout << "-1\n";
      } else
        cout << "-1\n";
    }
  }
  return 0;
}
