Given a grid with dimensions R x C, the 2 players (say JON and ARYA ) can move the coin over the grid satisfying the following rules:

There is coin on (1,1) cell initially.

JON will move first.

Both will play on alternate moves.

In each move they can place coin on following positions if current position of coin is x,y x+1,y x+2,y x+3,y x,y+1 x,y+2 x,y+3 x,y+4 x,y+5 x,y+6

Player who cannot make any move will lose this game.

â€‹Both play optimally.

Input:

The first line of the input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line contaning 2 space seperated integers C and R.

Output:
For each test case, output the name of the winner ( either JON or ARYA)