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

import itertools
import math
#
# ans_list = 1
not_pair = False
not_set = False

# for combi in itertools.combinations(A, 2):
#     ans = fractions.gcd(combi[0], combi[1])
#     if ans != 1:
#         not_pair = True
#         if ans_list == 1:
#             ans_list = ans
#         else:
#             ans_list = fractions.gcd(ans, ans_list)
#             if ans_list != 1:
#                 not_set = True
#                 break
#
# if not not_pair:
#     print("pairwise coprime")
# elif not not_set:
#     print("setwise coprime")
# else:
#     print("not coprime")

ans = A[0]
for i in range(1, N):
    ans = math.gcd(ans, A[i])
    if ans != 1:
        not_pair = True
if ans != 1:
    not_set = True

if not not_pair:
    print("pairwise coprime")
elif not not_set:
    print("setwise coprime")
else:
    print("not coprime")