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)
        data = [e for e in data if e % p != 0]
    return data
primes = get_sieve_of_eratosthenes(1000000)
smallprimes = [x for x in primes if x < 1000]
used = {}
for prime in primes:
    used[prime] = 0

n = int(input())
a = map(int, input().split())
for ai in a:
    for smallprime in smallprimes:
        if ai % smallprime == 0:
            used[smallprime] += 1
    if ai in primes and ai not in smallprimes:
        used[ai] += 1
pairwise = True
setwise = True
for prime in used:
    if used[prime] > 1:
        pairwise = False
    if used[prime] == n:
        setwise = False
if pairwise:
    print("pairwise coprime")
elif setwise:
    print("setwise coprime")
else:
    print("not coprime")