from math import gcd, sqrt
from functools import reduce
def sieve(n):
    if n <= 4:
        return list(range(2, n))
    def _sieve_of_eratosthenes(n):
        table = [1] * n
        table[0] = table[1] = 0
        for i in range(2, int(sqrt(n))+1):
            if table[i]:
                for j in range(i**2, n, i):
                    table[j] = 0
        return [i for i in range(2, n) if table[i]]
    return _sieve_of_eratosthenes(n)

n, *A = map(int, open(0).read().split())
P = sieve(max(A))

def f(A, P):
    D = set()
    for a in A:
        for p in P:
            if a % p == 0:
                if p not in D:
                    D.add(p)
                    a //= p
                else:
                    return False
    return True

if reduce(gcd, A) == 1:
    if f(A, P):
        print('pairwise coprime')
    else:
        print('setwise coprime')
else:
    print('not coprime')