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

A_max = max(A)
P = []
arr = list(range(2, A_max + 1))
while len(arr) > 0:
    i = arr.pop(0)
    P.append(i)
    arr = [j for j in arr if j % i != 0]
    if i > A_max ** 0.5:
        P.extend(arr)
        break
 
"""
素因数分解
"""
 
 
def factorize(x):
    f = []
    for p in P:
        rest = x
        cnt = 0
        while True:
            if rest % p != 0:
                break
            rest = rest // p
            cnt += 1
        f.append(cnt)
    return f
 
 
facts = [factorize(A_i) for A_i in A]
 
if all(sum([facts[j][i] > 0 for j in range(N)]) < 2 for i in range(len(P))):
    print('pairwise coprime')
    exit()
 
if all(not all([facts[j][i] > 0 for j in range(N)]) for i in range(len(P))):
    print('setwise coprime')
    exit()
 
print('not coprime')