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()))
chohuku=set()
wa=set()
f=False
for idx,num in enumerate(a):
    s=factorization(num)
    if idx==0:
        chohuku=set(s)
        wa=set(s)
    else:
        chohuku=chohuku&set(s)
        if f==False:
            for ss in s:
                if ss in wa:
                    f=True
                    break
                else:wa.add(ss)
if len(chohuku)==0 :
    if f==False:
        print("pairwise coprime")
    else:
        print("setwise coprime")
else:
    print("not coprime")

