import math
# エラトステネスの古いで高速化してるけど、O(AloglolgA + NlogA)なので、
# 普通に計算してもO(NlogA)で計算できいるので門d内ないのでは？

# sエラトステネスの篩は頭の中に出てきたけど、一定の値までの素数を列挙するという問題だったので、活用できないと思ってしまsった。

N = int(input())
TOP = 10**6+1
D = [i for i in range(100)]


def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int type.')
    if n < 2:
        raise ValueError('n is more than 2')
    prime = [2]
    limit = int(n**0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return prime + data
        prime.append(p)
        tmp = []
        for e in data:
            if e % p != 0:
                tmp.append(e)
            else:
                D[e] = p
        data = tmp


get_sieve_of_eratosthenes(100)
for i in range(len(D)):
    d = D[i]
    if d % 2 == 0:
        D[i] = 2


def retrive_prime(x):
    res = {}
    while True:
        d = D[x]
        if d in res:
            res[d] += 1
        else:
            res[d] = 1
        if d == x:
            break
        x //= d
    return res


B = [int(x) for x in input().split()]
A = [retrive_prime(x) for x in B]
ifPairwise = True
ifSetwier = True
data = [0 for _ in range(10**6+1)]
pair = math.gcd(B[0], B[1])
for i in range(N-1):
    a = A[i]
    pair = math.gcd(pair, B[i])
    for x in a.keys():
        if data[x-1] == 1:
            ifPairwise = False
        else:
            data[x-1] = 1
pair = math.gcd(pair, B[-1])
for a in A[-1].keys():
    if data[a-1] == 1:
        ifPairwise = False
    else:
        data[a-1] = 1

if not pair == 1:
    ifSetwier = False

if ifPairwise:
    print("pairwise coprime")
elif ifSetwier:
    print("setwise coprime")
else:
    print("not coprime")
