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

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


n=int(input())
arr=list(map(int,input().split()))

# print(primes[:10])
ok=True

cnt=[0]*(10**6+1)
for i in arr:
	while i>1 :
		cnt[primes[i]]+=1
		while i!=1 and i%primes[i]==0:
			i//=primes[i]
		if cnt[primes[i]]>1:
			ok=False
		# print(i)
	if not ok :
		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')

