from math import gcd

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

c=max(A)
D=[0]*(c+1)
div=[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  or j>D[i] :
           break
        D[i*j]=j
f=0
for i in A:
    if c>1:
        c=gcd(c,i)
    if i==1:
        continue
    temp=i
    print(temp,D[temp])
    if temp==D[temp]:
        div[temp]+=1
#        if div[temp]>=2:
#            f=1
#        continue
    while temp!=D[temp]:
        div[D[temp]]+=1
        if div[temp]>=2:
            f=1
        temp=temp//D[temp]
#    if c==1 and f==1:
#        break

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

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

else:
    print('not coprime')