# -*- coding: utf-8 -*-
import copy

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return divisors


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

pcf = True
pc = set(make_divisors(a[0]))
pcl = len(pc)
sc = copy.deepcopy(pc)

for i in a[1:]:
    d = set(make_divisors(i))
    dl = len(d) - 1
    pc = pc.union(d)
    pcl2 = len(pc)
    if pcl + dl != pcl2:
        pcf = False
    pcl = pcl2

    sc = sc.intersection(d)

if pcf:
    print("pairwise coprime")
elif len(sc) == 1:
    print("setwise coprime")
else:
    print("not coprime")
