The lust for throne and power in the kingdom of Numberland has ensued a series of battles between 2 mighty armies - The Composites and The Primes. The kings decide to send their armies in waves. Both the armies consist of warriors having either prime or composite power. The warriors of both the armies fight against each other according to certain rules:
They are numbered from 0 to N-1
They fight against the warrior of the opposite army having the same number as her/himself.
The warrior having greater power wins by losing the equal amount of power the opposite warrior has and the other warrior dies (i.e. his power = 0) in this case.
However both the armies have 1 special power. The composites' warriors having composite power totally defeat the opposite warrior without losing any power themselves. The same applies for The Primes.
Update: In case of a tie i.e a prime powered warrior from Primes army facing a composite powered warrior from the Composites army, the original rule applies.
Update: The army with greater power wins.
Determine the army that wins after each wave.
Input:
First line consists of number of waves
Then each wave consists of 3 lines:
First line consists of the number of warriors in each army, n
Second line consists of the powers of warriors of The Composites, c[i]
Third line consists of the powers of warriors of The Primes, p[i]
Output:
Output the army winning the battle or print "Tie" (without quotes) if it's a tie
Constraints:
1 ≤ t ≤ 10
1 ≤ n ≤ 10
2 ≤ c[i], p[i] ≤ 100
Problem Setter : Siddharth Seth