from functools import reduce
from math import gcd
import sys
sys.setrecursionlimit(10**8)
global f


def chk(a):
    global f
    if a==D[a]:
        if div[D[a]]>=1:
            f=1
            return 
        div[D[a]]+=1
        return
    while a!=D[a]:
        if div[D[a]]>=1:
            f=1
            return
        div[D[a]]+=1
        chk(a//D[a])
    if a!=D[a] and a in P:
        if div[a]>=1:
            f=1
            return
        div[a]+=1


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

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

for i in range(2,c):
    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
g=c
f=0
for i in A:
    if i==1:
        continue
    chk(i)
    if f==1:
        break



if f==0:
    print('pairwise coprime')

elif reduce(gcd, A) == 1:
    print('setwise coprime')

else:
    print('not coprime')