

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = int(input())
a = list(map(int, input().split()))

d = {}
flag = False
for i in a:
    data = list(set(prime_factorize(i)))
    for k in data:
        try:
            if d[k] >= 1:
                d[k] += 1
                flag = True
        except:
            d[k] = 1
if not flag:
    print("pairwise coprime")
else:
    flag = False
    for i in d.values():
        if i == len(a):
            print("not coprime")
            flag = True
            break
    if not flag:
        print("setwise coprime")
