import math
from functools import reduce

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

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

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            if i != 1:
                lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

n = int(input())
a = list(map(int,input().split()))

# pairwise coprime -> それぞれがすべて互いに素
# setwise coprime -> 互いに素でないのは混じっているが全体のgcdは1

b = [[]]*n
for i in range(n):
    b[i] = make_divisors(a[i])
# print(b)


if gcd_list(a) != 1:
    print("not coprime")
    exit()

p = {1}
for i in range(n):
    l1 = len(p)
    p = p.union(set(b[i]))
    l2 = len(p)
    # print(l1,l2)
    if l1 + len(b[i]) != l2:
        print("setwise coprime")
        exit()

print("pairwise coprime")