import sys
import math

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

set_A = set(A)
set_flag = len(set_A) != N

co_prime = True
max_a = max(A)

coprime = True
exists = set()
for i in range(2, max_a + 1):
    flag = False
    for j in range(i + i, max_a, i):
        if j in set_A:
            if not flag:
                flag = True
            elif flag:
                coprime = False
                break
    if not coprime:
        break
pairwise = coprime and N == len(set_A)
if pairwise:
    print("pairwise coprime")
    sys.exit()

setwise = False
tmp = A[0]
for i in range(N):
    tmp = math.gcd(tmp, A[i])
if tmp == 1:
    setwise = True

if setwise:
    print("setwise coprime")
else:
    print("not coprime")