#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  long long n, q;
  cin >> n >> q;
  vector<long long> a(n);
  bool one = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    one |= a[i] == 1;
  }
  sort(a.rbegin(), a.rend());
  for (int i = 1; i < n; ++i) a[i] += a[i - 1];
  while (q--) {
    long long x;
    cin >> x;
    if ((x % 2 && !one)) {
      cout << "-1\n";
      continue;
    }
    cout << lower_bound(a.begin(), a.end(), x) - a.begin() + 1 << "\n";
  }
  return 0;
}
