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

def div(n):
    for k in range(2,n+1):
        if n % k == 0:
            return k
    return 1

def pf(n):
    pf=[]
    while n != 1:
        pf.append(div(n))
        n = n // div(n)
    p = list(set(pf))
    return p

"""pc = True
for i in range(N-1):
    ai = pf(A[i])
    li = len(ai)
    for j in range(i+1,N):
        aj = pf(A[j])
        lj = len(aj)
        a = list(set(ai + aj))
        if (li + lj) != len(a):
            pc = False
            break
        """


cp = False
apf =[]
for e in range(N):
    apf.extend(pf(A[e]))
l1 = len(apf)
l2 = len(list(set(apf)))
if l1 == l2:
    cp = True

if cp == False:
    sc = False
    g = functools.reduce(math.gcd, A)
    if g == 1:
        sc = True


if cp == True:
    print('pairwise coprime')
elif sc == True:
    print('setwise coprime')
else:
    print('not coprime')









