import sys


def LI():
    return list(map(int, input().split()))


def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)


N = LI()
A = LI()
g = 0
for a in A:
    g = gcd(g, a)
if g != 1:
    print("not coprime")
    sys.exit()

sosu = [True]*(10**6)
sosu[0] = sosu[1] = False
for i in range(2, 10**6):
    if not sosu[i]:
        continue
    for j in range(i*i, 10**6, i):
        sosu[j] = False

used = [False]*(10**6)
prime = [a for a in A if sosu[a]]
for i in prime:
    used[i] = True
not_prime = [a for a in A if not sosu[a]]
ruto_prime = [a for a in range(1000) if sosu[a]]
for i in not_prime:
    for j in ruto_prime:
        if i == 1:
            break
        if i % j != 0:
            continue
        if used[j]:
            print("setwise coprime")
            sys.exit()
        used[j] = True
        while i % j == 0:
            i //= j
    if i > 1:
        if used[i]:
            print("setwise coprime")
        used[i] = True
print("pairwise coprime")
