mod=10**9+7
n=int(input())
a=list(map(int,input().split()))
a.sort()
g=a[0]
for i in a:
    g=math.gcd(g,i)
d=dict()
for i in a:
    if i%2==0:
        if 2 in d:
            d[2]+=1
        else:
            d[2]=1
    while i%2==0:
        i//=2
    for j in range (3, int(math.sqrt(i))+1 ):
        if i%j==0:
            if j in d:
                d[j]+=1
            else:
                d[j]=1
            while i%j==0:
                i//=j
    if i>2:
        if i in d:
            d[i]+=1
        else:
            d[i]=1
c=1
for i in d:
    c=max(c,d[i])
if c==1:
    print("pairwise coprime")
elif g==1:
    print("setwise coprime")
else:
    print("not coprime")