e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

Ardent Butterfly Collector

Ardent Butterfly Collector

As you know, Andry Sergeevich is an ardent collector of butterflies. He has a huge collection, the exhibits of which are collected from around the world. We assume that there are 2 * 109 species of butterflies in the world.

In order not to get confused, Andrei Sergeevich assigned a unique number to each species. Butterfly numbering always starts from one. Now he wants to know if there is a butterfly with a number k in his collection, or he will have to get it, spending a lot of effort and money.

Input

First line contains the number of species of butterflies n (1n105) in the collection of Andrei Sergeevich. Next line contains n numbers in ascending order - the numbers of butterfly species in the collection. All kinds of butterflies in the collection have different numbers.

Third line contains the number of species of butterflies m (1m105), about which Andrei Sergeevich wants to know if he has them in the collection or not. The last line contains m numbers - numbers of species of butterflies, the presence of which must be checked.

Output

Print m lines. For each query print "YES", if the butterfly with the given number exists in his collection and "NO" otherwise.

Time limit 3 seconds
Memory limit 128 MiB
Input example #1
7
10 47 50 63 89 90 99
4
84 33 10 82
Output example #1
NO
NO
YES
NO
Labyrinth of the Minotaur