#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
map<int, int> s;
inline int read() {
  int 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 a[50001];
int main() {
  int n = read(), m = read();
  for (int i = 0; i < n; i++) {
    a[i] = read();
    s[a[i]] = 1;
  }
  int q = read();
  while (q--) {
    int ans = 50001;
    int k = read();
    for (int i = 0; i < n; i++) {
      for (int j = 1; j <= m; j++) {
        if (a[i] * j > k) break;
        if (a[i] * j == k) ans = min(ans, j);
        for (int t = 1; t <= m - j; t++) {
          if (((k - a[i] * j) % t) == 0) {
            if (s.count((k - a[i] * j) / t) == 1) ans = min(ans, j + t);
          }
        }
      }
    }
    if (ans == 50001)
      printf("-1\n");
    else
      printf("%d\n", ans);
  }
}
