#K73377. Donation Threshold Checker

    ID: 33962 Type: Default 1000ms 256MiB

Donation Threshold Checker

Donation Threshold Checker

You are given a list of donation amounts and a list of query thresholds. For each query, you need to check whether there exists at least one donation that is greater than or equal to the queried threshold. Formally, for each query threshold \(q\), determine if there exists a donation \(d\) such that \(d \ge q\).

Input: The first line of input contains two integers \(N\) and \(Q\), where \(N\) is the number of donations and \(Q\) is the number of queries. The second line contains \(N\) space-separated integers representing the donation amounts. The third line contains \(Q\) space-separated integers representing the query thresholds.

Output: For each query, output "YES" if there exists at least one donation \(\ge\) the query threshold, otherwise output "NO". Each answer should be printed on its own line.

inputFormat

The input is read from standard input (stdin) and is structured as follows:

N Q
D1 D2 D3 ... DN
Q1 Q2 Q3 ... QQ

Where \(N\) is the number of donations, \(Q\) is the number of queries, \(D_i\) represents the donation amounts, and \(Q_i\) are the threshold values for the queries.

outputFormat

For each of the \(Q\) queries, output a single line with either "YES" or "NO" depending on whether there exists at least one donation amount that is greater than or equal to the query threshold.

## sample
5 3
100 200 300 400 500
150 600 300
YES

NO YES

</p>