import sys
input = sys.stdin.readline
n = int(input())
a = [int(x) for x in input().split()]

m = max(a)
primes = list(range(m+1))
primes[1] = 0
for i in range(2, m+1, 2): primes[i] = 2

for i in range(3, int(m ** 0.5)+1):
    for j in range(i, m+1, i):
        if primes[j] > i: primes[j] = i

b = [0] * (m + 1)
def factorization(n):
    temp = n
    lst = []
    while temp != 1:
        lst.append(primes[temp])
        temp = temp // primes[temp]

    aset = set(lst)
    for i in aset:
        b[i] += 1

for aa in a:
    factorization(aa)
maxb = max(b)
if maxb <= 1: print('pairwise coprime')
elif maxb < n: print('setwise coprime')
else: print('not coprime')