SOCCERRR - FIFA SOCCER

According to FIFA regulations, in the game of soccer, a player in the attacking position is said to be offside when he is closer to his opponent's goal line than the last defender. 

Input

The first line of input is the number of test cases. Each test case has an A and a D which represents the number of attackers and defenders.

In the next line there will be a number as much as A which describes the location of the attacker against the enemy goal line. Then in the next line followed by a number as much as D which describes the location of the defending player against his own goal line.

Output

Determine whether the attacker's position is in the offside test case or not. 

Example

Input:
2
3 5
12 10 9
7 6 5 6 7
2 1
5 1
2 Output: Case #1 : NO
Case #2 : YES

Added by:wibit
Date:2022-03-11
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2022-10-29 00:07:07
Corrected sample formatting so that it matches the actual input.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.