from math import gcd
from collections import Counter, defaultdict, deque

(N,) = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]

ACounter = Counter(A)
seenCount = defaultdict(set)


def sieve(n):
    ret = [-1] * n
    for i in range(2, n):
        if ret[i] == -1:
            for j in range(i, n, i):
                # each cell is rewritten once for each of its unique prime factors so total cost is O(n loglog n)
                ret[j] = i
                if ACounter[j]:
                    seenCount[i].add(j)
    return ret


sieve(10 ** 6 + 1)

# print({k: v for k, v in seenCount.items() if v})
hasPair = any(len(v) > 1 for k, v in seenCount.items())
"""
hasPair = False
for i in range(N):
    for j in range(i + 1, N):
        if gcd(A[i], A[j]) != 1:
            hasPair = True

"""

if hasPair:
    g = 0
    for x in A:
        g = gcd(g, x)
    if g == 1:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    print("pairwise coprime")

