def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0], is_prime[1] = False, False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]: continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]: ass.append(i)
    return ass

prime = primes(1009)

def prime_decomposition(n):
    i = 0
    table = []
    while prime[i]**2 < n:
        while n % prime[i] == 0:
            n //= prime[i]
            table.append(prime[i])
        i += 1
    if n > 1: table.append(n)
    return set(table)

n = int(input())
a = list(map(int, input().split()))
d = [0] * (10**6+1)
for i in range(n):
    for j in prime_decomposition(a[i]):
        d[j] += 1

max_ = max(d)
if max_ == 1:
    print('pairwise coprime')
elif max_ != n:
    print('setwise coprime')
else:
    print('not coprime')