Binary search#226

Binary search

5 seconds
256 megabytes
Easy (≈1000)

An array of ordered integers is given. You are required to answer queries: whether is present in the array or not.

Input

The first line provides the integers and q\:(n, q \le 10^6). The next line contains integers in increasing order. Each of the following lines contains the variable . The numbers in the array are not greater than 10^9 in absolute value.

Output

For each value of , output "YES" if is in the array, and "NO" otherwise, each on a separate line.

Examples

Example 1

Loading
Loading

Example 3

Loading
Loading