from math import gcd

n = int(input())
a = list(map(int, input().split()))
MAX = 10 ** 6


def sieve(x):
    """
    Sieve of Eratosthenes
    :param x: max value
    :return: list of bool
    """

    is_prime = [True] * (x + 1)
    is_prime[0] = is_prime[1] = False

    for i in range(2, x + 1):
        if is_prime[i]:
            for j in range(i * 2, x + 1, i):
                is_prime[j] = False

    return is_prime


is_prime = sieve(MAX)
primes = [i for i, e in enumerate(is_prime) if e]
a.sort()

bl = True
for e in a:
    nxt = []
    for e2 in primes:
        if e % e2 != 0:
            nxt.append(e2)
        else:
            while e % e2 == 0:
                e //= e2

    if e != 1:
        bl = False

    primes = nxt

g = a[0]
for e in a:
    g = gcd(g, e)

if g == 1 and bl:
    ans = "pairwise coprime"
elif g == 1:
    ans = "setwise coprime"
else:
    ans = "not coprime"

print(ans)
