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

#互いに素　互除法 a=bq+r
def gcd(a,b):
    r=1
    while r>0:
        q,r= a // b, a % b
        a, b = b, r
    return(a)
#n個のgcd
def gcdn(A):
    min=gcd(A[0],A[1])
    for i in range(2,len(A)):
        min=gcd(min,A[i])
    return(min)

max = 0
for i in range(N-1):
    for j in range(i,N-1):
        if max < gcd(A[i], A[i + 1]):
            max = gcd(A[i], A[i + 1])

if max == 1:  # 全てのペアが互いに素
    print("pairwise coprime")
elif gcdn(A)==1: #全ての最大公約数が1
    print("setwise coprime")
else:
    print("not coprime")