#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> m;
map<long long int, long long int>::iterator it;
long long int arr[5005];
int main() {
  ios::sync_with_stdio(false);
  long long int i, j, k, res, n, q, x;
  cin >> n >> q;
  k = q;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    x = arr[i];
    for (j = 0; j <= k; j++) {
      if (m[j * x] == 0) {
        m[j * x] = j;
      } else {
        m[j * x] = min(m[j * x], j);
      }
    }
  }
  res = 100;
  cin >> q;
  while (q--) {
    res = 100;
    cin >> x;
    for (i = 1; i <= n; i++) {
      for (j = 0; j <= k; j++) {
        long long int needed = x - (arr[i] * j);
        if (needed < 0) {
          continue;
        } else if (needed == 0) {
          res = min(res, j);
          continue;
        } else if (m.find(needed) != m.end()) {
          res = min(res, j + m[needed]);
        }
      }
    }
    if (res > k) res = -1;
    cout << res << endl;
  }
  return 0;
}
