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 = math.gcd(combi[0], combi[1])
#     if ans != 1:
#         not_pair = True
#         if ans_list == 1:
#             ans_list = ans
#         else:
#             ans_list = math.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")

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            arr.append(i)

    if temp != 1:
        arr.append(temp)

    return arr

fact_list = []
all_fact = []
for a in A:
    fact = factorization(a)
    fact_list.append(fact)
    all_fact += fact

if len(all_fact) == len(set(all_fact)):
    print("pairwise coprime")

else:

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

    if not not_set:
        print("setwise coprime")
    else:
        print("not coprime")