import fractions
import functools

N = int(input())
A = list(map(int, input().split()))

factors = [[] for _ in range(int(1e6)+1)]
for i in range(2, int(1e6)+1):
    if factors[i]: continue
    for j in range(i, int(1e6)+1, i):
        factors[j].append(i)

def classify():
    def pairwise():
        all_factors = [False]*int(1e6+1)
        for a in A:
            for f in factors[a]:
                if all_factors[f]:
                    return False
                all_factors[f] = True
        return True

    if pairwise():
        return 'pairwise coprime'
    elif functools.reduce(fractions.gcd, A) == 1:
        return 'setwise coprime'
    else:
        return 'not coprime'

print(classify())
