from math import gcd

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

am = max(a)

memo = [1] * (am+1)
memo[0] = 0
memo[1] = 0

d = set([])

for ai in range(2, am+1):
    for j in range(2, am // ai + 1):
        memo[ai * j] = 0

cs = set([])
for i, memoi in enumerate(memo):
    if memoi:
        cs.add(i)

# print(cs)


f1 = 1
f2 = 1

for ai in a:
    lim = int(ai**0.5)+1
    f0 = 0
    if ai in cs:
        if ai in d:
            f0 = 1
        else:
            d.add(ai)
    else:  
        for i in cs:
            if i >= lim:
                break
            if ai % i == 0:
                if i in d or ai//i in d:
                    f1 = 0
                    f0 = 1
                    break
                else:
                    d.add(i)
                    d.add(ai//i)
    if f0:
        break


if f1:
    print('pairwise coprime')
else:
    g = a[0]
    for ai in a:
        g = gcd(ai, g)
    if g == 1:
        print('setwise coprime')
    else:
        print('not coprime')
