import fractions
from functools import reduce

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


def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)


# print(gcd_list(A))

max_A = max(A)
# エラトステネスの篩により素数を高速で求める
# そのかんにある数値がふるい落とされたその素数をメモしておく

D = [0] * (max_A + 1)
primes = list(range(2, max_A + 1))
prime = []
for i in range(max_A):
    if len(primes) == 0:
        break
    first = primes[0]
    prime.append(first)
    new_prime = []
    for j in range(len(primes)):
        if primes[j] % first == 0:
            D[primes[j]] = first
            continue
        else:
            new_prime.append(primes[j])

    primes = new_prime

# print(prime)
# print(D)

pairwise = True
check = [0] * (max_A + 1)
new_A = A[:]
for i in range(N):
    min_prime = D[new_A[i]]
    check[min_prime] += 1
    while True:
        new_A[i] //= min_prime
        if new_A[i] == 1:
            break

    if max(check) > 1:
        pairwise = False
        break

if pairwise:
    print('pairwise coprime')
else:
    if gcd_list(A) == 1:
        print('setwise coprime')
    else:
        print('not coprime')
