
def searchPrimeNum(N):
    max = int(N**0.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

plis = searchPrimeNum(10**3+1)
N = int(input())
d = {p:0 for p in plis}
A = [int(i) for i in input().split()]


#素因数分解(素数列挙が必要)
def pfact(N):
    #素数列挙
    for p in plis:
        if N%p == 0:
            d[p] += 1
            N = N//p
        while N%p == 0:
            N = N//p
        if N == 1:
            break
    if N != 1:
        if N in d.keys():
            d[N] += 1
        else:
            d[N] = 1
    return 0

for a in A:
    pfact(a)
m = max(d.values())
if m == 1:
    print("pairwise coprime")
elif m == N:
    print("not coprime")
else:
    print("setwise coprime")
