Tim's Leaf Project

0

0 votes
Very-Easy
Problem

During the Summer Break, Tim stays with his Grandparents, who own an Orchid. Tim is in an N + 1 person team along with his friends and they been assigned a project, where each member has to present atleast 1 Leaf registered in the School's Leaf Database, which consists of 185 Leaf Species.
Over the Course of the Summer, Tim would roam and collect Leaves that he found to be interesting. He collected a total of 'L' Leaves. Tim knowing his friends too well knew that he would have to provide for his team. Each Leaf, say X, that Tim collected is denoted by a number. For an X upto 185, it is taken to be a registered leaf species and can be provided to the team. Any other value is regarded as a disfigured model of a leaf, and is not fit for presentation.

Can Tim and his Team find the required number of leaves for the Project?

Input Format :

The First Line contains T which represents the number of Test Cases.

Each Test Case consists of two lines, the first of which contains two space-separated integers, N and L.

The Second Line consists of L space-separated integers (X1, X2, ..., Xl) describing the type of leaf species.

1T100
1Xi5000 where i ⋲ [1, L]
1L5000
1N20

Output Format :
For each Probable Scenario, print the word "YES" if the Team retrieve the required number of leaves and "NO" if they cannot.

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?