#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
map<int, bool> a;
int b[6000];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    a[x] = true;
    b[i] = x;
  }
  int q;
  scanf("%d", &q);
  for (int zz = 0; zz < q; ++zz) {
    int x;
    scanf("%d", &x);
    int ans = INF;
    for (int i = 0; i <= k; ++i) {
      for (int i2 = 1; i2 + i <= k; ++i2) {
        for (int j = 0; j < n; ++j) {
          int c = x - b[j] * i;
          if (c % i2 == 0 && a.find(c / i2) != a.end()) ans = min(ans, i + i2);
        }
      }
    }
    printf("%d\n", (ans == INF) ? -1 : ans);
  }
  return 0;
}
