import math

n = int(input())
aa = tuple(map(int, input().split()))

primes = [i for i in range(1000001)]
for j in range(2, 1001):
    if primes[j] is None:
        continue
    for i in range(j + j, len(primes), j):
        primes[i] = None
primes[0] = primes[1] = None
primes = set([p for p in primes if p is not None])

f = 0
p = aa[0]
for a in aa:
    p = math.gcd(p, a)
    if a not in primes:
        f += 1
if f <= 1:
    print("pairwise coprime")
elif p == 1:
    print("setwise coprime ")
else:
    print("not coprime")
