import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

def make_divisors(n):
    res = []
    x = n
    y = 2
    while y*y <= x:
        while x % y == 0:
            res.append(y)
            x //= y
        y += 1
    if x > 1:
        res.append(x)
    return res

n = ni()
a = na()

wa = set(make_divisors(a[0]))
s = len(wa)
seki = wa

for i in range(1,n):
    ii = set(make_divisors(a[i]))
    s += len(ii)
    wa = wa | ii
    seki = seki & ii
    if s != len(wa) and len(seki) == 0:
        print('setwise coprime')
        exit()

if len(wa) == s:
    print('pairwise coprime')
elif len(seki) == 0:
    print('setwise coprime')
else:
    print('not coprime')