import math
N = int(input())
A = list(map(int, input().split()))

def calc_primes(n):
    data = [i for i in range(2, n + 1)]
    for d in data:
        data = [x for x in data if (x == d or x % d != 0)]
    return data

primes = calc_primes(int(math.sqrt(10**6)))

def factorize(n):
    factors = set()
    for prime in primes:
        while n % prime == 0:
            n //= prime
            factors.add(prime)
    return factors

factors = factorize(A[0])
union = factors
intersection = factors

is_pairwise = True

for a in A[1:]:
    factors = factorize(a)
    if is_pairwise:
        if union.intersection(factors):
            is_pairwise = False
        union = union.union(factors)
    if intersection:
        intersection = intersection.intersection(factors)

if is_pairwise:
    print('pairwise coprime')
elif not intersection:
    print('setwise coprime')
else:
    print('not coprime')
