from math import gcd
sz=10**3+1
primes=[1]*(sz)

# l=[]
for i in range(2,sz):
	if primes[i]:
		for j in range(i*i,sz,i):
			primes[j]=0

l=[i for i,j in enumerate(primes[2:],2) if j]
n=int(input())
arr=list(map(int,input().split()))

# print(l)
r=(max(arr))**(0.5)
ok=True
# print(r)
for pr in l:
	
	cnt=0
	for i in range(n):
		if arr[i]%pr==0:
			cnt+=1
	if cnt>1:
		ok=False
		break
	if pr**2>r:
		break

g=gcd(arr[0],arr[1])
for i in range(n):
	g=gcd(g,arr[i])

if ok :
	print("pairwise coprime ")
elif g==1:
	print('setwise coprime ')
else:
	print('not coprime')

