import math
n = int(input())
alist = list(map(int,input().split()))

mod = 10**9 + 7
prod = 1

a_max = max(alist)
D = [math.inf]*(a_max+1)
D[0] = 1
D[1] = 1
p = 2
for i in range(1,a_max+1):
    if D[i] == math.inf:
        p = i
        mul_p = p
        while mul_p <= a_max:
            D[mul_p] = min(p,D[mul_p])
            mul_p += p


def factor(n):
    f = []
    f.append(n)
    while n > 1:
        f.append(D[n])
        n //= D[n]
    f.append(1)
    return f

factor_set = set()
pairwise = True
for i in range(n):
    a = alist[i]

    a_factor = factor(a)
    for f in a_factor:
        if f != 1 and f in factor_set:
            pairwise = False
            break
        factor_set.add(f)

    if pairwise == False:
        break
if pairwise == True: 
    print("pairwise coprime")
    exit()

def gcf(a,b):
    if a == 0:
        return b
    return gcf(b % a,a)

#setwise
now = alist[0]
for i in range(1,n-1):
    now = gcf(now,gcf(alist[i],alist[i+1]))

if now == 1:
    print("setwise coprime")
else:
    print("not coprime")