n=int(input())
a=list(map(int,input().split()))
temp=[0]*(10**3+2)
b=0
for i in range(2,10**3+2):
    if temp[i]==0:
        for j in range(n):
            if a[j]%i==0:
                k=2
                l=i
                while True:
                    temp[l]+=1
                    l*=k 
                    k+=1
                    if l>=10**3+2:
                        break
if max(temp)==1:
    print("pairwise coprime")
elif min(temp)>=2:
    print("not coprime")
else:
    print("setwise coprime")