from math import gcd
def pairWiseCoprime(n,A):
	for i in range(n-1):
		for j in range(i+1,n):
			if gcd(A[i],A[j])==1:
				continue
			return False
	return True
def setWiseCoprime(n,A):
	if n<2:
		return True
	res=gcd(A[0],A[1])
	for i in range(2,n):
		res=gcd(res,A[i])
	return res==1
def solve(n,A):
	mod=10**9+7

	if pairWiseCoprime(n,A):
		return "pairwise coprime"
	elif setWiseCoprime(n,A):
		return "setwise coprime"
	else:
		return "not coprime"


N=int(input())
A=list(map(int,input().split()))
print(solve(N,A))