from math import gcd

N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

g = A[0]
l = A[0]
prod = A[0]
for i in range(1, N):
	g = gcd(g, A[i])
	l = ((l * A[i]) // g) % MOD
	prod = (prod * A[i]) % MOD
	
if g != 1:
	print("not coprime")
else:
	if l == prod:
		print("pairwise coprime")
	else:
		print("setwise coprime")