# E - Coprime

n = int(input())
a = [int(x) for x in input().split()]

import math
for i in range(0,len(a)-1):
	for j in range((i+1),len(a)):
		if math.gcd(a[i],a[j]) == 1:
			if i == len(a)-2 and j == len(a)-1:
				j = 0
		else:
			break
if i == len(a)-2 and j == 0:
	print("pairwise coprime")
else:
	x = math.gcd(a[0],a[1])
	for k in range(2,len(a)):
		x = math.gcd(x,a[k])
	if x == 1:
		print("setwise coprime")
	else:
		print("not coprime")