import math
def prime_numbers(x):
    if x < 2:
        return []
    prime_numbers = [i for i in range(x)]
    prime_numbers[1] = 0
    for prime_number in prime_numbers:
        if prime_number > math.sqrt(x):
            break
        if prime_number == 0:
            continue
        for composite_number in range(2 * prime_number, x, prime_number):
            prime_numbers[composite_number] = 0
    return [prime_number for prime_number in prime_numbers if prime_number != 0]
def soinnsuu(x):
    s = set()
    for i in primes:
        if i > int(math.sqrt(x)):
            break
        elif x % i == 0:
            while x % i == 0:
                x //= i
            s.add(i)
    s.add(x)
    return s
from math import gcd
n = int(input())
a = list(map(int, input().split()))
g = 0
for i in range(n):
    g = gcd(g, a[i])
primes = prime_numbers(1000000)
cur = soinnsuu(a[0])
f = False
for i in range(1, n):
    s2 = soinnsuu(a[i])
    if len(cur & s2) != 0:
        f = True
        break
    cur |= s2
if not f:
    print("pairwise coprime")
elif g == 1:
    print("setwise coprime")
else:
    print("not coprime")