Humpty Dumpty lives on a two-dimensional plane. He likes to jump. Currently, he is located in the point (0, 0). He would like to reach the point (x, y). You are given the point x & y.
Humpty Dumpty wants to reach the desired destination in a specific way: using a series of jumps with pre-determined lengths. You are given these lengths in an array lengthOfJumps . You should determine whether Humpty Dumpty would be able to reach desired position using all of the jump lengths.
Note :
Input :
The first line of input contains an integer T denoting the number of test cases.
Each test case contains an integer N denoting number of jumps, followed by second line of input containing two space separated integers x y. Now, N lines of input follows having an integer each where i th line denotes the lengthOfJumps[i]
Output :
Print "Able" (quotes for clarity) if Humpty Dumpty is able to reach his desired destination from (0, 0) using the desired sequence of jump lengths. Otherwise, print "Not able".
Constraints :
Case #1:
In this case, Humpty Dumpty can first jump from (0,0) to (0,1) then from (0, 1) to (0, 2) then again from (0, 2) to (0, 0)
Case #2:
In this case, Humpty Dumpty must make a jump of length exactly 2, followed by a jump of length exactly 5. One possibility is to jump from (0, 0) to (2, 0), and then from (2, 0) to (5, 4).
Case #3:
The distance from (0, 0) to (3, 4) is 5. You cannot get there using a single jump of length 4 - it is too short.