Problem: In this problem, you are initially given an empty multiset. You have to process two types of queries:
- ADD — add an element equal to to the multiset;
- GET — say whether it is possible to take the sum of some subset of the current multiset and get a value equal to .
Input Format: The first line contains one integer () — the number of queries.
Then lines follow, each of which contains two integers , , denoting the -th query. If , then the -th query is ADD (). If , then the -th query is GET ().
Output Format: For each GET query, print YES if it is possible to choose a subset with sum equal to , or NO if it is impossible.