n = int(input())
*A, = map(int, input().split())
m = max(2, max(A))
P = {p: True for p in range(2, m + 1)}
for i in range(2, m + 1):
    for j in range(2 * i, m + 1, i):
        P[j] = False
P = {p: 0 for p in P if P[p]}
for a in A:
    for p in P:
        if a % p == 0:
            P[p] += 1
s = max(P.values())
if s <= 1:
    print('pairwise coprime')
elif s < n:
    print('setwise coprime')
else:
    print('not coprime')
