from math import gcd
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

d = defaultdict(int)

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

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

# print(cs)


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
                f0 = 1
                break
    if f0:
        break


if f1:
    print('pairwise coprime')
else:
    g = a[0]
    for ai in a:
        g = gcd(ai, g)
    if g == 1:
        print('setwise coprime')
    else:
        print('not coprime')
