from math import sqrt
from collections import Counter

def arrayF(n): 
    F=[0]*(n+1) 
    i=2 
    while i*i<=n:
        if F[i] == 0: 
            k=i*i
            while k <= n:
                if F[k] == 0:
                    F[k] = i
                k += i
        i += 1 
    return F


def factorization(x, F): 
    primeFactors = set()
    while F[x] > 0:
        primeFactors.add(F[x])
        x //= F[x] 
    if x != 1:
        primeFactors.add(x)
    return Counter(primeFactors)

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

amax = max(A)
F  = arrayF(amax)

P = Counter()
for a in A:
    p = factorization(a, F)
    P += p

p_max = max(P.values()) if P else 1
if  p_max == 1:
    print('pairwise coprime')
elif  p_max <  n:
    print('setwise coprime')
else:
    print('not coprime')