import math
import itertools

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

t = A[0]
check = A[0]
for i in range(1, n):
    t = math.gcd(t, A[i])
   

s = 1
LIS = list(itertools.combinations(A, 2))
for i in LIS:
    if math.gcd(i[0], i[1]) != 1:
        s = 0
        break

# -> [(1, 2), (1, 3), (2, 3)]

if t == 1 and s == 1:
    print('pairwise coprime')
elif t == 1:
    print('setwise coprime')
else:
    print('not coprime')
