from math import gcd

N=int(input())
A=list(map(int, input().split()))

c=max(A)
g=max(A)
D=[0]*(c+1)
yak=[0]*(c+1)
P=[]

for i in range(2,c+1):
    if D[i]==0:
        P.append(i)
        D[i]=i
    for j in P:
        if i*j>c:
           break
        D[i*j]=j 

for i in A:
    g=gcd(g,i)
    temp=i
    while temp!=D[temp]:
        yak[D[temp]]+=1
        temp=temp//D[temp]

if max(yak)<=1:
    print('pairwise coprime')

elif g==1:
    print('setwise coprime')

else:
    print('not coprime')