#include <bits/stdc++.h>
using namespace std;
const int M = 10000000;
vector<int> D;
int K;
int us[M + 10];
int comp(int a) {
  for (int k = 1; k <= K; ++k) {
    for (int l = 1; l <= k; ++l) {
      for (int d : D) {
        if (l * d <= a) {
          int g = a - l * d;
          if (l == k && g == 0) {
            return k;
          } else if (l < k && g % (k - l) == 0) {
            int z = g / (k - l);
            if (z <= M && us[z]) {
              return k;
            }
          }
        }
      }
    }
  }
  return -1;
}
int main(void) {
  int n;
  scanf("%d%d", &n, &K);
  D.resize(n);
  for (int i = 0; i < (n); ++i) {
    scanf("%d", &D[i]);
    us[D[i]] = 1;
  }
  int Q;
  scanf("%d", &Q);
  while (Q--) {
    int a;
    scanf("%d", &a);
    printf("%d\n", comp(a));
  }
  return 0;
}
