#abc177 e
import sys,math,collections,itertools
input = sys.stdin.readline

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            while temp%i==0:
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)
    return arr


N=int(input())
A=list(map(int,input().split()))
num = [0]*(10**6+1)

fact = []

for a in A:
    fact += factorization(a)
mn= collections.Counter(fact).most_common()[0][1]

if mn == 1:
    print('pairwise coprime')
elif mn ==N:
    print('not coprime')
else:
    print('setwise coprime')
