import functools
import itertools

input()
A = [int(x) for x in input().split()]
primes = [set() for _ in A]
for i in range(2, max(A) + 1):
    for j in range(len(A)):
        while A[j] % i == 0:
            primes[j].add(i)
            A[j] //= i

if all(len(a & b) == 0 for a, b in itertools.combinations(primes, 2)):
    print('pairwise coprime')
elif len(functools.reduce(lambda a, b: a & b, primes)) == 0:
    print('setwise coprime')
else:
    print('not coprime')
