import sys
from math import gcd
from functools import reduce

input = sys.stdin.readline


def find_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)

    # divisors.sort()
    return divisors


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

ds = [0] * (10 ** 6 + 1)

for ai in a:
    for d in find_divisors(ai):
        ds[d] += 1

if max(ds[2:]) == 1:
    ans = "pairwise coprime"
elif reduce(gcd, a) == 1:
    ans = "setwise coprime"
else:
    ans = "not coprime"
print(ans)
