import numpy as np

def seachPrimeNum(N):
    max = int(np.sqrt(N))
    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
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)
    if arr == []:
        arr.append(n)
    return arr

# sosuu=set(seachPrimeNum(10**6))
n=int(input())
a=list(map(int,input().split()))
num_list=set()
all=set()
flag=0#0 最大公約数　1　一部
f=True# True not coprime
for idx,num in enumerate(a):
    s=factorization(num)
    common=set()
    if idx>=1:
        num_list=num_list&set(s)
    for soin in s:
        if idx==0:
            num_list.add(soin)
        elif soin in all :
            if soin not in num_list:
                flag=1
                f=False
        else:
            f=False
        all.add(soin)

if f:
    print("not coprime")
elif flag==0:
    print("pairwise coprime")
else:
    print("setwise coprime")
