n = int(input())
a = [int(x) for x in input().split()]
primes = [2]
A = max(a)
b = [0] * (A+1)

for L in range(3, A, 2): 
    if all(L % L2 != 0 for L2 in primes):
        primes.append(L)

def factorization(n):
    arr = 0
    temp = n
    for i in primes:
        if i**2 > n: break
        if temp%i==0:
            b[i] += 1
            arr += 1
            while temp%i==0:
                temp //= i
    if temp!=1:
        b[temp] += 1
        arr += 1

    if arr==0:
        b[n] += 1

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