from math import gcd
from functools import reduce

n = int(input())
A = list(map(int, input().split()))
res = ['pairwise coprime', 'setwise coprime', 'not coprime']

# 素因数分解 O(n ** 0.5)
def prime_factor(n):
    factor = []
    for i in range(2, int(n ** 0.5) + 1):
        while (n % i == 0):
            factor.append(i)
            n //= i
    if n != 1:
        factor.append(n)
    return factor

prime_factors = []
for a in A:
    factor = prime_factor(a)
    factor_set = list(set(factor))
    prime_factors.extend(factor_set)

if len(prime_factors) == len(set(prime_factors)):
    print(res[0])
elif reduce(gcd, A) == 1:
    print(res[1])
else:
    print(res[2])