from math import gcd

N=int(input())
A=list(map(int,input().split()))
ans=["pairwise coprime","setwise coprime","not coprime"]
factor={}
cond=True
g=A[0]
a=0
D=[_ for _ in range(max(A)+1)]

for i in range(2,int(max(A)**0.5)+1):
    n=i
    while i*n<=max(A):
        D[i*n]=i
        n+=1

for i in range(N):
    g=gcd(g,A[i])

    temp=A[i]
    while cond and temp!=D[temp]:
        if D[temp] in factor:
            cond=False
        else:
            factor[D[temp]]=1
            temp=D[temp]

if g>1:
    a=2
elif not cond:
    a=1
print(ans[a])