from math import gcd 
def primes(max_number):
    pr = list(range(3, max_number+1, 2))
    lpr = len(pr)
    for i,n in enumerate(pr):
        if n:
            if n*n > max_number:
                break
            for j in range(i+n, lpr, n):
                pr[j] = 0
    yield 2
    yield from[i for i in pr if i]

pr = [False]*(10**6+5)
for k in list(primes(10**6+1)):
    pr[k] = True
pr[2] = False

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

gu = False
for a in A:
    if pr[a]: continue
    if gu and a%2 == 0:
        break
    if (not gu) and (a%2 == 0):
        gu = True
else:
    print('pairwise coprime')
    exit()

now = A[0]
for a in A:
    now = gcd(now, a)
    if now == 1:
        print('setwise coprime')
        exit()
print('not coprime')