import math

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

gx=list()
if (n-1)%2==0:
    npt=(n*(n-1))//2
else:
    npt=(((n+1)*n)//2)-n

jud=1

for i in range(n):
    j=1
    while i+j<n:
        g = math.gcd(a[i], a[i+j])
        if g!=1:
            gx.append(g)
            if gx[0]!=g:
                jud=0
        j+=1

if len(gx)==0:
    print("pairwise coprime")
elif len(gx)==npt and jud==0:
    print("setwise coprime")
else:
    print("not coprime")
