import numpy as np

def seachPrimes(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2,N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum

primes = seachPrimes(10**3)
n = int(input())
A = list(map(int, input().split()))


cnts = []
for prime in primes:
    cnt = 0
    for a in A:
        if a % prime == 0:
            cnt += 1
    cnts.append(cnt)
if max(cnts) == n or min(A) == max(A):
    print("not coprime")
elif max(cnts) >= 2:
    print("setwise coprime")
else:
    print("pairwise coprime")