import math

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

B = [1] * N
B[0] = A[0]
for i in range(1, N):
    B[i] = B[i - 1] * A[i]

is_pairwise = True
X = []
for i in range(N-1):
    g = math.gcd(A[i], B[-1]//B[i])
    if g != 1:
        is_pairwise = False
        X.append(g)

if is_pairwise:
    print('pairwise coprime')
    exit()

tmp = X[0]
for i in range(1, len(X)):
    tmp = math.gcd(tmp, X[i])

if tmp == 1:
    print('setwise coprime')
else:
    print('not coprime')
