import math

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

def gen_primes(limit):
    p = [] # それまでに生成した素数
    for i in range(2, limit+1):
        if i == 2 or all([i%j != 0 for j in p if j <= int(i**.5)]):
            p.append(i)
            yield i

factors = []
gcd = a[0]
for A in a:
    for p in gen_primes(int(max(a)**.5)):
        if A%p == 0:
            factors.append(p)
            break
    else:
        factors.append(A)
    gcd = math.gcd(gcd, A)

if len(factors) == len(set(factors)):
    print('pairwise coprime')
elif gcd == 1:
    print('setwise coprime')
else:
    print('not coprime')