def seachPrimeNum(N):
    max = int(N**.5)
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

P=seachPrimeNum(5*10**5)

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

factorization(24) 

n=int(input())
A=[int(i) for i in input().split()]
DIC={i:0 for i in range(1,10**6+1)}
for ele in A:
    DIC[ele]=1
pair=True
setw=True
if n!=len(A):
    pair=False

for pri in P:
    cnt=0
    for i in range(pri,10**6+1,pri):
        cnt+=DIC[i]
    if cnt>1:
        pair=False
    if cnt==len(A):
        setw=False

if pair:
    print("pairwise coprime")
elif setw:
    print("setwise coprime")
else:
    print("not coprime")
