import numpy as np
n=int(input())
a=list(map(int, input().split()))

N=max(a)+1
A=list(range(2,N))
p=list()
c=[0]*max(a)

while A[0]**2<=N:
	tmp=A[0]
	p.append(tmp)
	A=[e for e in A if e%tmp!=0]
l=p+A

for i in range(len(a)):
    for j in range(len(l)):
        if a[i]%l[j]==0:
            c[l[j]-1]+=1

#print(c)
maxcount=max(c)
if np.gcd.reduce(a) != 1:
    print('not coprime')
elif maxcount <= 1:
    print('pairwise coprime')
else:
    print('setwise coprime')