import numpy as np


def primeNumberCreate():
    primeList = [2]  # 2以下の素数リストを作成
    maxNumber = 10 ** 6  # 1000以下の数字をチェック
    for x in range(3, maxNumber):
        for y in primeList:
            if x % y == 0:
                break
        else:
            primeList.append(x)  # 割り切れるものがなければリストに追加
    return primeList


prime_tuple = primeNumberCreate()
prime_num = 78498
n = int(input())
exp_array = np.zeros((n, prime_num), dtype="int")
for i, a in enumerate(map(int, input().split())):
    for p_i in range(prime_num):
        if a == 1:
            break
        p = prime_tuple[p_i]
        while a % p == 0:
            a //= p
            exp_array[i][p_i] += 1

max_exp = exp_array.max(axis=0)
min_exp = exp_array.min(axis=0)
sum_exp = exp_array.sum(axis=0)
# print(exp_array)
# print(sum_exp)
# print(min_exp)
# print(max_exp)
if np.all(np.equal(sum_exp, max_exp)):
    print("pairwise coprime")
elif np.all(np.equal(min_exp, 0)):
    print("setwise coprime")
else:
    print("not coprime")
