def all_same(a):
    return all([x==a[0] for x in a])

def gcd(a,b):
	if b==0:
		return a
	else:
		return gcd(b,a%b)
		
N=int(input())
array=[int(x) for x in input().split()]
checklist=[]
totality=0
for i in array:
	totality=gcd(totality,i)

for i in range(N-1):
	checklist.append(gcd(array[i],array[i+1]))
if 1 in checklist and all_same(checklist):
	print("pairwise coprime")
elif totality==1:
	print("setwise coprime")
else:
	print("not coprime")