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


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


def is_pairwise_coprime(A):
    N = max(A)
    if N == 1:
        return True
    table = defaultdict(bool)
    for a in A:
        k = a
        i = 2
        while i * i <= k:
            is_div = False
            while k % i == 0:
                k //= i
                is_div = True
            if is_div:
                if table[i]:
                    return False
                table[i] = True
            i += 1
        if k > 1:
            table[k] = True
    return True


def solve(N, A):
    if is_pairwise_coprime(A):
        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))
