#include <bits/stdc++.h>
using namespace std;
bool was[10000007];
int a[5005];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]), was[a[i]] = 1;
  int q;
  scanf("%d", &q);
  for (int tt = 0; tt < q; tt++) {
    int x;
    scanf("%d", &x);
    int ans = 1000;
    for (int i = 0; i < n; i++) {
      if (x % a[i] == 0) ans = min(ans, x / a[i]);
    }
    for (int i = 0; i < n; i++) {
      for (int j = 1; j <= k; j++) {
        for (int z = 1; z + j <= k; z++) {
          long long v = x - a[i] * 1ll * j;
          if (v > 0 && v / z <= 10000000 && v % z == 0 && was[v / z])
            ans = min(ans, j + z);
        }
      }
    }
    if (ans > k) ans = -1;
    printf("%d\n", ans);
  }
  return 0;
}
