from collections import Counter
rd = lambda: map(int, raw_input().split(' '))
n, q = rd()
a = sorted(Counter(rd()).items(), reverse=True)
for _ in xrange(q):
    b = int(raw_input())
    # ans = 0
    # for x, cnt in a:
    #     to_del = cnt if x * cnt <= b else b / x
    #     ans += to_del
    #     b -= to_del * x
    # print ans if b == 0 else -1