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


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


def sieve(n):
    """
    n以下の素数を昇順に列挙する
    """
    prime_divisors = [1 for i in range(n+1)]
    for i in range(2, n+1):
        if prime_divisors[i] == 1:
            for j in range(i, n+1, i):
                prime_divisors[j] = i
    return prime_divisors


def solve(N, A):
    prime_divisors = sieve(max(A))
    c = Counter()
    for a in A:
        p = a
        d = Counter()
        while p > 1:
            q = prime_divisors[p]
            d[q] = 1
            p //= q
        c += d
    if len(c) == 0 or 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))
