from math import gcd
N=int(input())
A=list(map(int,input().split()))
l=[0]*1000001
pr=[]
for i in range(2,1000001):
    if l[i]:
        continue
    pr.append(i)
    for j in range(i**2,1000001,i):
        l[j]=1
lp=len(pr)
l=[0]*lp
g=gcd(A[0],A[1])
for i in A:
    g=gcd(g,i)
if g>1:
    print("not coprime")
    exit()
for i in A:
    t=i
    for j in range(lp):
        pj=pr[j]
        if pj>t:
            break
        if t%pj==0:
            if l[j]:
                print("setwise coprime")
                exit()
            l[j]=1
            while 1:
                t//=pj
                if t%pj:
                    break
print("pairwise coprime")