#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, K, Q;
int v[5005];
bool vis[10000005];
int cal(int x, int now) {
  for (int i = 1; i <= K - now; i++)
    if (x % i == 0 && x / i <= 10000000)
      if (vis[x / i]) return now + i;
  return K + 1;
}
int main() {
  n = read();
  K = read();
  for (int i = 1; i <= n; i++) v[i] = read(), vis[v[i]] = 1;
  Q = read();
  while (Q--) {
    int x = read(), ans = K + 1;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= K && v[i] * j <= x; j++) {
        if (v[i] * j == x) {
          ans = min(ans, j);
          break;
        }
        ans = min(ans, cal(x - v[i] * j, j));
      }
    if (ans > K)
      puts("-1");
    else
      printf("%d\n", ans);
  }
  return 0;
}
