import fractions
import functools

N = int(input())
A = list(map(int, input().split()))

factors = [[] for _ in range(int(1e6)+1)]
for i in range(2, int(1e3)+1):
    for j in range(i, int(1e6)+1, i):
        factors[j].append(i)

def classify():
    set_factors = [False]*int(1e6+1)
    for a in A:
        for f in factors[a]:
            if set_factors[f]: break
            set_factors[f] = True
    else:
        return 'pairwise coprime'

    if functools.reduce(fractions.gcd, A) == 1:
        return 'setwise coprime'

    return 'not coprime'

print(classify())
