import sys
input = sys.stdin.readline
from math import gcd
from functools import reduce
from collections import Counter


def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


def prime_factorization(n):
    """
    nの素因数分解を求める
    """
    c = Counter()
    i = 2
    while i * i <= n:
        while n % i == 0:
            n //= i
            c[i] += 1
        i += 1
    if n > 1:
        c[n] += 1
    return c


def solve(N, A):
    C = Counter()
    for a in A:
        primes = prime_factorization(a)
        for key in primes.keys():
            C[key] += 1
    if C.most_common()[0][1] == 1:
        return "pairwise coprime"
    if reduce(gcd, A) == 1:
        return "setwise coprime"
    return "not coprime"


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))
