#include <bits/stdc++.h>
using namespace std;
int a[5010];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int q;
  cin >> q;
  while (q--) {
    int x;
    cin >> x;
    int ans = 22;
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= m; j++)
        if (x >= a[i] * j) {
          int t = x - a[i] * j;
          if (!t) {
            ans = min(ans, j);
            break;
          }
          for (int k = j + 1; k <= m; k++)
            if (t % (k - j) == 0) {
              int y = t / (k - j);
              int lo = 0, hi = n + 1;
              while (hi - lo > 1) {
                int mi = (lo + hi) / 2;
                if (a[mi] < y)
                  lo = mi;
                else
                  hi = mi;
              }
              if (a[hi] == y) {
                ans = min(ans, k);
                break;
              }
            }
        }
    if (ans == 22) ans = -1;
    cout << ans << endl;
  }
}
