# E - Coprime

import math
from functools import reduce
from itertools import chain
from collections import Counter

n = int(input())
a = list(map(int, input().split()))
assert len(a) == n

if reduce(math.gcd, a) > 1:
    print("not coprime")
    exit()

def primes_under(n):
    plist = []
    isprime = [1] * (n + 1)
    for p in range(2, n + 1):
        if isprime[p]:
            plist.append(p)
            for q in range(p + p, n + 1, p):
                isprime[q] = 0
    return plist

primes = primes_under(10 ** 6)

def factors(n):
    """Return the list of prime factors of n."""
    fac = set()
    sqrtn = math.sqrt(n)
    i = 0
    while primes[i] <= sqrtn:
        if n % primes[i] == 0:
            fac.add(primes[i])
            n //= primes[i]
        else:
            i += 1
    if n > 1:
        fac.add(n)
    return fac

c = Counter(chain.from_iterable(map(factors, a)))
if max(c.values(), default=0) > 1:
    print("setwise coprime")
else:
    print("pairwise coprime")
