import  math

n = int(input())
A = list(map(int, input().split()))
ans = A[0]
flag_for = 0
flag = 0

for i in range(n-1):
    ans = math.gcd(ans, A[i+1])
    if ans != 1:
        flag = 1
    if flag_for == 0:
        for j in range(i+1, n):
            if math.gcd(A[i], A[j]) != 1:
                flag_for = 1
                break

# for i in range(1, n):
#     ans = math.gcd(ans, A[i])
#     if ans != 1:
#         flag = 1

if ans == 1 and flag == 0:
    print('pairwise coprime')
elif ans == 1:
    print('setwise coprime')
else:
    print('not coprime')
