CSES - Aalto Competitive Programming 2024 - wk8 - Wed - Skyline
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Working at the kindergarten, Maija is building a mock city from rocks with the kids. She has gotten more fired up about the thing than most of the children and is now building a full replica of New York's skyline. Maija has gathered nn rocks numbered 1,2,,n1,2,\dots,n and the height of the ii-th rock is aia_i. She is going to build qq towers numbered 1,2,,q1,2,\dots,q. The height of the ii-th tower will be bib_i. For each tower, determine if she can build it by towering the rocks she has currently at her disposal.

Input

The first line contains two integers nn and qq. The second line contains nn integers a1,a2,,ana_1,\,a_2,\dots,\,a_n. The third line contains qq integers b1,b2,,bqb_1,\,b_2,\dots,\,b_q.

Output

Print the answers to the queries on a single line. Print "Yes" if it is possible to construct the tower and "No" otherwise.

ans1 ans2  ansqans_1\ ans_2\ \dots\ ans_q

Constraints

  • 1n20001 \leq n \leq 2000
  • 1q1051 \leq q \leq 10^5
  • 1ai1051 \leq a_i \leq 10^5
  • 1bi1061 \leq b_i \leq 10^6

Example 1

Input:

5 5
10 4 3 9 1 
5 38 11 99 60

Output:

Yes No Yes No No

Example 2

Input:

10 10
10 6 2 10 9 8 7 7 6 3 
15 98 23 1 70 26 91 44 64 78

Output:

Yes No Yes No No Yes No Yes No No