import math
def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n ** 0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

def divisor(n):
    ass = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            if i != 1:
                ass.append(i)
            if i ** 2 == n:
                continue
            ass.append(n // i)
    return ass

n = int(input())
a = list(map(int, input().split()))
pair = False
divisors = set(divisor(a[0]))
ggcd = a[0]
for i in range(1, n):
    divs = set(divisor(a[i]))
    if len(divs & divisors) != 0:
        pair = True
    else:
        divisors = set(list(divisors) + list(divs))
    ggcd = math.gcd(ggcd, a[i])
if ggcd != 1:
    print("not coprime")
else:
    if pair:
        print("setwise coprime")
    else:
        print("pairwise coprime")