from math import gcd
from functools import reduce


def is_prime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True


# def Eratosthenes_sieve(n):
#     primes = []
#     table = [True] * (n + 1)
#     for i in range(n + 1):
#         if is_prime(i):
#             primes.append(i)
#     return primes


def Eratosthenes_sieve(n):
    table = [True] * (n + 1)
    for i in range(n + 1):
        if is_prime(i):
            for j in range(2 * i, n + 1, i):  # 素数の倍数は非素数
                table[j] = False
        else:
            table[i] = False
    return table


def calc_ggcd(arr):
    return reduce(gcd, arr)


def decomposition(n):
    if n == 1:
        return True
    is_coprime = True
    if appear[n]:
        is_coprime = False
    else:
        appear[n] = True
    # while i * i <= n:
    for i in primes:
        if i**2 > n:
            break
        if n % i == 0:
            if appear[i]:
                is_coprime = False
            else:
                appear[i] = True
    return is_coprime


n = int(input())
a = list(map(int, input().split()))
ma = max(a)
# primes = Eratosthenes_sieve(ma)
prime_table = Eratosthenes_sieve(ma + 1)
primes = []
for i in range(ma + 1):
    if prime_table[i]:
        primes.append(i)

appear = [False] * (max(a) + 1)
keep_pair_coprime = True

for aa in a:
    if not decomposition(aa):
        keep_pair_coprime = False

        # 素因数分解 O(√N)
global_gcd = calc_ggcd(a)
if keep_pair_coprime:
    print('pairwise coprime')
elif global_gcd == 1:
    print('setwise coprime')
else:
    print('not coprime')
