from math import gcd
n=int(input())
arr=list(map(int,input().split()))
p=[i for i in range(10**6+1)]
se=[0]*(10**6+1)
f=0
for i in arr:
    if i!=1 and se[i]:
        f=1
    se[i]=1

for i in range(2,10**3+1):
    if p[i]==i:
        c=0
        if se[i]:
            c += 1
        for j in range(i*i,10**6+1,i):
            if p[j]==j:
                if se[j]:
                    c+=1
                if c>=2:
                    f=1
                    break
        if f:
            break
if f==0:
    print("pairwise coprime")
else:
    gc=arr[0]
    for i in arr[1:]:
        gc=gcd(i,gc)
    if gc==1:
        print("setwise coprime")
    else:
        print("not coprime")




