import math

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

pcount = 78498 # not include 1

hurui = [1] * 1000
primes = []

for n in range(2, 1000):
    if hurui[n-1] != 1:
        continue

    primes.append(n)

    k = 2
    while n * k <= 1000:
        hurui[n * k - 1] = n
        k += 1

#print(len(list(filter(lambda i: i == 0, hurui))))
#print(primes)

wise = A[0]
for n in A[1:]:
    wise = math.gcd(wise, n)

pairwise = True
for i in range(N):
    a = A[i]
    for p in primes:
        if a % p != 0:
            continue
        for j in range(i+1, N):
            if A[j] % p == 0:
                pairwise = False
                break
        if not pairwise:
            break

if pairwise:
    ans = 'pairwise coprime'
elif wise == 1:
    ans = 'setwise coprime'
else:
    ans = 'not coprime'


print(ans)