from collections import defaultdict
N = int(input())
a = list(map(int, input().split()))

am = int(max(a)**0.5)+1

memo = [1] * (am+1)
memo[0] = 0
memo[1] = 0

p = -1
g = a[0]
d = defaultdict(int)

for ai in range(2, am+1):
    if ai == p:
        memo[ai] = 0
        continue
    for j in range(2, am // ai + 1):
        memo[ai * j] = 0
    p = ai

cs = []
for i, memoi in enumerate(memo):
    if memoi:
        cs.append(i)

# print(cs)

def make_divisors(n):
    global d



f1 = 1
f2 = 1

for ai in a:
    lim = int(ai**0.5)+1
    f0 = 0
    for i in cs:
        if i >= lim:
            break
        if ai % i == 0:
            d[i] += 1
            if i != ai // i:
                d[ai//i] += 1
            if d[i] > 1 or d[ai//i] > 1:
                f1 = 0
            if d[i] == N or d[ai//i] == N:
                f2 = 0
                break

if f1:
    print('pairwise coprime')
elif f2:
    print('setwise coprime')
else:
    print('not coprime')
