from math import gcd
from functools import reduce


def facs(n):
    """試し割り法における割る数を生成する。"""
    yield 2
    for x in range(3, n, 2):
        yield x


def main():
    input()  # N
    array = [int(x) for x in input().split()]
    MAX_A = 10 ** 6 + 1
    histogram = [0] * MAX_A
    primes = []
    not_primes = set()
    divided_by = [-1] * MAX_A
    for x in facs(MAX_A):
        if x in not_primes:
            continue
        primes.append(x)
        divided_by[x] = x
        for y in range(x * 2, MAX_A, x):
            not_primes.add(y)
            if divided_by[y] == -1:
                divided_by[y] = x
    for x in array:
        histogram[divided_by[x]] += 1
    if max(histogram) < 2:
        return 'pairwise coprime'

    gcd_total = reduce(gcd, array)
    if gcd_total == 1:
        return 'setwise coprime'
    else:
        return 'not coprime'


if __name__ == '__main__':
    print(main())
