battle-of-two-armies_18780
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

SAMPLE INPUT
1
8
5 36 8 29 89 17 22 54
70 48 16 25 92 63 7 12

SAMPLE OUTPUT
The Composites
t = int(raw_input())

primes = [2,   3,   5,   7,  11,  13,  17,  19,  23,  29,  31,  37,  41,
  43,  47,  53,  59,  61,  67,  71,  73,  79,  83,  89,  97]

while t>0:
	t -= 1
	n = int(raw_input())
	c = list(map(int, raw_input().split()))
	p = list(map(int, raw_input().split()))
	
	for i in range(0, n):
		if c[i] not in primes and p[i] in primes :
			m = max(c[i], p[i])
			c[i] -= m
			p[i] -= m
		elif c[i] not in primes and p[i] not in primes :
			p[i] = 0
		elif c[i] in primes and p[i] in primes:
			c[i] = 0
		else:
			m = max(c[i], p[i])
			c[i] -= m
			p[i] -= m
			
	if(sum(c) == sum(p)):
		print "Tie"
	elif sum(c) > sum(p):
		print "The Composites"
	else:
		print "The Primes"