#include <bits/stdc++.h>
using namespace std;
int N, K, Q;
bool V[10000010];
int A[5010];
long long X, Y;
int ans, a, b, i, q, sum;
int solve(long long X) {
  for (sum = 1; sum <= K; sum++)
    for (a = 1; a <= sum; a++) {
      b = sum - a;
      for (i = 1; i <= N && 1LL * a * A[i] <= X; i++) {
        Y = X - a * A[i];
        if ((b != 0 && Y % b == 0 && (Y / b) < 10000010 && V[Y / b] == 1) ||
            (b == 0 && Y == 0))
          return sum;
      }
    }
  return -1;
}
int main() {
  cin >> N >> K;
  for (i = 1; i <= N; i++) {
    cin >> A[i];
    V[A[i]] = 1;
  }
  cin >> Q;
  for (q = 1; q <= Q; q++) {
    cin >> X;
    cout << solve(X) << '\n';
  }
  return 0;
}
