import math
N = int(input())
A = list(map(int,input().rstrip().split(" ")))
M = int(math.sqrt(max(A))) + 1
sosuu = set()
sosuu.add(2)
for i in range(3,M,2):
    for j in sosuu:
        if i % j == 0:
            break
    else:
        sosuu.add(i)
pair = True
setw = True
counter = 0
lis = [0 for i in range(10 ** 6)]
for q in range(len(A)):
    i = A[q]
    remset = set()
    for j in sosuu:
        if i % j == 0:
            while i % j == 0:
                i = i // j
            lis[j] += 1
            if lis[j] == 2:
                pair = False
        else:
            if lis[j] >= 2 or pair == False:
                remset.add(j)
    if i != 0:
        lis[i] += 1
        if lis[i] == 2:
            pair = False
    for j in remset:
        sosuu.remove(j)
for i in range(10 ** 6):
    if lis[i] == N:
        setw = False

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