#include <bits/stdc++.h>
using namespace std;
int n, k, q, x;
const int NN = 5000 + 10;
int a[NN];
bool binary_search(int low, int high, int val) {
  int mid;
  while (low < high) {
    mid = (low + high + 1) >> 1;
    if (a[mid] <= val)
      low = mid;
    else
      high = mid - 1;
  }
  return a[low] == val;
}
int main() {
  while (scanf("%d %d", &n, &k) == 2) {
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    sort(a, a + n);
    scanf("%d", &q);
    for (int i = 0; i < q; i++) {
      scanf("%d", &x);
      int ans = 1000000;
      for (int j = 0; j < n; j++) {
        if (x % a[j] == 0 && x / a[j] <= k) {
          ans = ans > x / a[j] ? x / a[j] : ans;
        }
        for (int take1 = 1; take1 <= k; take1++) {
          if (a[j] * take1 >= x) break;
          int y = x - a[j] * take1;
          for (int take2 = 1; take1 + take2 <= k; take2++) {
            if (y % take2 == 0 && binary_search(0, j - 1, y / take2)) {
              ans = ans > take1 + take2 ? take1 + take2 : ans;
            }
          }
        }
      }
      if (ans == 1000000) ans = -1;
      printf("%d\n", ans);
    }
  }
  return 0;
}
