from math import gcd


class Eratosthenes(): # エラトステネスの篩
    def __init__(self, N) # 素数リスト生成 O(n*log(log n))
        is_prime = [0, 0] + [1] * (N - 1)
        for i in range(int(N**0.5) + 1):
            if is_prime[i] == 0:
                continue
            for j in range(i * 2, N + 1, i):
                is_prime[j] = 0
        self.prime_list = [i for i, pi in enumerate(is_prime) if pi == 1]


    def factor(self, NUM):  # 高速素因数分解 O(log num)
        PRIME = set()
        for p in self.prime_list:
            if p * p > NUM:
                break
            while NUM % p == 0:
                NUM //= p
                PRIME.add(p)
        if NUM > 1:
            PRIME.add(NUM)
        return PRIME


n = int(input())
a = list(map(int, input().split()))

ans = 0
for ai in a:
    ans = gcd(ans, ai)
if ans != 1:
    print('not coprime')
    exit()

era = Eratosthenes(max(a))
num = set()
for ai in a:
    prime = era.factor(ai)
    if len(prime & num) > 0:
        print('setwise coprime')
        break
    num |= prime
else:
    print('pairwise coprime')
