N = int(input())
A = list(map(int, input().split()))
f = 0
m = 10**6 + 10
t = [0] * (10**6 + 10)

def bunkai(n):
    global f
    if n % 2 == 0 and t[2] == 0:
        t[2] = 1
    elif n % 2 == 0 and t[2] == 1:
        f = 1
        return
    while n % 2 == 0:
        n //= 2
    l = 3
    while l * l < n:
        if n % l == 0:
            if t[l] == 1:
                f = 1
                return
            while n % l == 0:
                n //= l
        l += 2
    if n != 1:
        if t[n] == 1:
            f = 1
        else:
            t[n] = 1

for i in range(N):
    bunkai(A[i])
    if f == 1:
        break

from math import gcd
g = A[0]
if f == 1:
    for i in range(1, N):
        g = gcd(g, A[i])
        if g == 1:
            break

if f == 0:
    print("pairwise coprime")
elif g == 1 and f == 1:
    print("setwise coprime")
else:
    print("not coprime")