n = int(input())
A = tuple(map(int, input().split()))
fact_counts = dict()
def fact(n):
    if n%2 == 0:
        fact_counts.setdefault(2, 0)
        fact_counts[2] += 1
        while n%2 == 0:
            n //= 2

    for f in range(3, int(n**0.5)+1, 2):
        if n%f == 0:
            fact_counts.setdefault(f, 0)
            fact_counts[f] += 1
            while n%f == 0:
                n //= f

    if n > 1:
        fact_counts.setdefault(n, 0)
        fact_counts[n] += 1

for a in A:
    fact(a)

pairwise = True
for c in fact_counts.values():
    if c > 1:
        pairwise = False
        break

if pairwise:
    print('pairwise coprime')
else:
    if max(fact_counts.values()) == n:
        print('not coprime')
    else:
        print('setwise coprime')
