import sys

input = sys.stdin.readline


def gcd(a, b):
    r = a % b

    while r:
        a = b
        b = r
        r = a % b

    return b


def lcm(a, b):
    return a * b // gcd(a, b)


n = int(input())
p = list(map(int, input().split()))


def pairwise():
    LCM = p[0]
    mul = p[0]

    for i in range(1, n):
        LCM = lcm(LCM, p[i])
        mul *= p[i]

        if mul != LCM:
            return False

    return True


def setwise():
    GCD = p[0]
    for i in range(1, n):
        GCD = gcd(GCD, p[i])

    return GCD == 1


GCD = p[0]
LCM = p[0]
mul = p[0]

done = False

for i in range(1, n):
    GCD = gcd(GCD, p[i])

    if not done:
        LCM = lcm(LCM, p[i])
        mul *= p[i]

    if LCM != mul:
        done = True

if not done:
    print("pairwise coprime")
elif done and GCD == 1:
    print("setwise coprime")
else:
    print("not coprime")