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

def eratosthenes(n):
    multiples = set()
    for i in range(2, n+1):
        if i not in multiples:
            yield i
            for j in range(i*i, n+1, i):
                multiples.add(j)

primes = list(eratosthenes(1000000))
seen = [0] * len(primes)
pc = True
for x in a:
    for i, p in enumerate(primes):
        if p > x: break
        if x % p == 0:
            seen[i] += 1
            if seen[i] > 1: pc = False
            while x % p == 0: x //= p
if pc:
    print('pairwise coprime')
elif n in seen:
    print('not coprime')
else:
    print('setwise coprime')

