import math
import collections
import copy

n = int(input())

a = list(map(int,input().split()))




beforeQ = collections.deque([i for i in range(2,10**6 + 1)])
D = dict()
p = 2
D[2] = 2
D[1] = 1

while p < math.sqrt(10**6):
    afterQ = collections.deque()
    while len(beforeQ) > 0:        
        k = beforeQ.popleft()
        if k % p != 0:
            afterQ.append(k)
        else:
            D[k] = p
    beforeQ = copy.copy(afterQ)
    p = beforeQ.popleft()
    D[p] = p
    

ansSet = set()
ansDict = dict()
count = 0

for i in a:
    k = i
    kSet = set()
    while k != 1:
        if D[k] in ansSet:
            if not(D[k] in kSet):
                ansDict[D[k]] += 1
                kSet.add(D[k])
                if ansDict[D[k]] > count:
                    count = ansDict[D[k]]
        else:
            ansSet.add(D[k])
            kSet.add(D[k])
            ansDict[D[k]] = 1
        k = k // D[k]

if count == 0:
    print("pairwise coprime")
elif count == len(a):
    print("not coprime")
else:
    print("setwise coprime")
