Membership Queries
Answer membership queries for an integer array.
Input
The first line contains n, followed by n integers. The next line contains q, followed by q queried integers.
Array and query counts are between $1$ and $10^5$. Integer values are between $-10^9$ and $10^9$. Deleting a missing multiset value has no effect.
Output
For every query, print YES if the value occurs in the array and NO otherwise.
Example
Input
8
1 2 3 2 1 3 4 8
4
1
5
3
7
Output
YES
NO
YES
NO
Comments