#include <bits/stdc++.h>
using namespace std;
int n, m, nq, a[5010];
bool use[10000010];
void read() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    use[a[i]] = true;
  }
}
void work() {
  cin >> nq;
  for (int i = 1, x; i <= nq; ++i) {
    cin >> x;
    int ans = 1 << 30;
    for (int j = 1; j <= n; ++j)
      for (int v1 = 1; v1 <= m; ++v1)
        if (v1 * a[j] <= x) {
          if (v1 * a[j] == x)
            ans = min(ans, v1);
          else
            for (int v2 = 1; v2 + v1 <= m; ++v2)
              if ((x - v1 * a[j]) % v2 == 0 &&
                  (x - v1 * a[j]) / v2 <= 10000000 && use[(x - v1 * a[j]) / v2])
                ans = min(ans, v1 + v2);
        }
    printf("%d\n", ans == 1 << 30 ? -1 : ans);
  }
}
int main() {
  read();
  work();
  return 0;
}
