import java.util.*;

public class ProbD {
	
	public static int calculate(int n,Map<Integer,Integer> coins, int obj){
		if(obj%2 !=0)
			return -1;
		
		int ans = 0;
		for (Map.Entry<Integer,Integer> entry : coins.entrySet()) {
			int coinValue = entry.getKey();
			int numCoins = entry.getValue();
			if(obj >= coinValue){
				int x = (obj/coinValue);
				if(x > numCoins)
					x = numCoins;
				obj -= x*coinValue;
				ans += x;
			}
			//if(obj == 0)
				//return ans;
        }
		
		if(obj == 0)
			return ans;
		else
			return -1;
	}

	public static void main(String[] args){
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		int queries = stdin.nextInt();
		
		Map<Integer,Integer> map = new HashMap<Integer,Integer>(); 
		for(int i=0; i<n; i++){
			int x = stdin.nextInt();
			if(map.containsKey(x)){
				int value = map.get(x);
				value++;			
				map.put(x,value);
			}
			else{
				map.put(x,1);
			}
			
		}
		
		Map<Integer,Integer> coins = new TreeMap<Integer,Integer>(Collections.reverseOrder());
		coins.putAll(map);
	
		for(int i=0; i<queries; i++){
			int q = stdin.nextInt();
			System.out.println(calculate(n,coins,q));
		}
	}


}