from math import gcd

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

num = 10 ** 6
is_prime = [True] * (num + 1)
is_prime[0] = False
is_prime[1] = False

for i in range(2, num + 1):
    if not is_prime[i]:
        continue

    cnt = 2
    while i * cnt <= num:
        is_prime[i * cnt] = False
        cnt += 1

primes = [i for i, p in enumerate(is_prime) if p]

pairwise = True
for p in primes:
    cnt = 0
    for a in A:
        if a % p == 0:
            cnt += 1

    if cnt > 1:
        pairwise = False
        break

g = A[0]
for a in A[1:]:
    g = gcd(g, a)

if pairwise:
    print('pairwise coprime')
elif g == 1:
    print('setwise coprime')
else:
    print('not coprime')
