from math import gcd

N = int(input())
A = list(map(int, input().split()))

def createPrimeList(N, isTable=True):
    isPrime = [True] * (N + 1)
    isPrime[0] = False
    isPrime[1] = False
    for i in range(2, N + 1):
        if not isPrime[i]:
            continue
        for p in range(i * 2, N, i):
            isPrime[p] = False
    return isPrime if isTable else [i for i in range(2, N) if isPrime[i]]

from collections import Counter
primeList = createPrimeList(10**5, False)
def primeFactorization2(N):
    primes = Counter()
    for p in primeList:
        while N % p == 0:
            N //= p
            primes[p] += 1
    return primes

def isSetwise(A):
    ret = A[0]
    for a in A:
        ret = gcd(ret, a)
    return ret == 1

def isPairwise(A):
    P = set()
    for a in A:
        ps = primeFactorization2(a)
        for p in ps.keys():
            if p in P:
                return False
            P.add(p)
    return True

if not isSetwise(A):
    print('not coprime')
    exit()

if isPairwise(A):
    print('pairwise coprime')
else:
    print('setwise coprime')
