N=int(input())

A=list(map(int,input().split()))
A_max=max(A)
D=[0] *(A_max+1) #xを割り切る最小の素数を格納

import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

for i in range(2,A_max+1):
    for j in range(2,int(i**0.5)+1):
        if i%j==0:
            D[i]=j
            break
    if D[i]==0:
        D[i]=i

def gcdlist(n):
    a=n
    l=[]
    if D[a] == a:
        return [a]
    else:
        while a>1:
            l.append(D[a])
            a //=D[a] 
            if a==D[a]:
                l.append(a)
                break
        return l

pairwise=True
gcds=[]
for i in range(N):
    l=gcdlist(A[i])
    if i==0:
        for j in l:
            gcds.append(j)
        continue
    for j in l:
        if j not in gcds:
            continue
        else:
            pairwise=False
    if pairwise==True:
        for j in l:
            gcds.append(j)
    else:
        break
if pairwise==True:
    print("pairwise coprime")
else:
    if gcd_list(A) == 1:
        print("setwise coprime")
    else:
        print("not coprime")