Subset Sum Queries

Given a set of n integers, and q queries where each query consists of an integer . For each query, you are asked to determine whether there exists a subset of the numbers that sum up to .

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 500).

The second line contains n space-separated integers (1 ≤ ≤ 100 000), the elements of the set.

The third line of the input contains a single integer q (1 ≤ q ≤ 100 000), the number of queries. Each of the next q lines contains a single integer (1 ≤ ≤ 100 000), representing the target sum for the i-th query.

Output

Output q lines, each containing either Yes or No, depending on whether there exists a subset of the numbers whose sum is equal to the corresponding query.

Examples

Input

Output

4
1 2 5 7
5
4
3
10
14
11

No
Yes
Yes
Yes
No

Constraints

Time limit: 10 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue