from math import gcd

N=int(input())
A=list(map(int,input().split()))
ans=["pairwise coprime","setwise coprime","not coprime"]
factor={}
cond=False
g=A[0]
a=0
for i in range(N):
    g=gcd(g,A[i])

    for j in range(2,int(A[i])+1):
        if A[i]%j==0:
            if j not in factor:
                factor[j]=1
            else:
                cond=True

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