import math
import itertools
from functools import reduce

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


def gcd(*numbers):
    return reduce(math.gcd, numbers)


def gcd_list(numbers):
    return reduce(math.gcd, numbers)


def is_coprime(x, y):
    return math.gcd(x, y) == 1


allCoprime = True
allNotCoprime = True

# combi = list(itertools.combinations(A, 2))
# for x in combi:
#     if is_coprime(x[0], x[1]):
#         allNotCoprime = False
#     else:
#         allCoprime = False

if gcd_list(A) == 1:
    allNotCoprime = False


if allCoprime:
    print("pairwise coprime")
elif allNotCoprime:
    print("not coprime")
else:
    print("setwise coprime")
