from math import gcd
from functools import reduce
from collections import Counter
from itertools import chain


# 素因数分解
def prime_factors(n):
    i = 2
    while i * i <= n:
        if n % i:
            i += 1
        else:
            n //= i
            yield i
    if n > 1:
        yield n


def solve(A):
    d = reduce(gcd, A)
    if d != 1:
        return 'not coprime'

    A = [a for a in A if a != 1]

    if len(set(A)) < len(A):
        return 'setwise coprime'

    c = Counter(chain.from_iterable(set(prime_factors(a)) for a in A))
    if c and max(c.values()) > 1:
        return 'setwise coprime'
    else:
        return 'pairwise coprime'


if __name__ == '__main__':
    N = int(input())
    A = list(map(int,input().split()))

    print(solve(A))
