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

max_A = max(A)

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 prime_list:
        if i > n:
            break

        if temp % i == 0:
            arr.append(i)

    return arr

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n ** 0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

prime_list = primes(max_A)
prime_list.sort()

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


# print(set_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:
        print("setwise coprime")
    else:
        print("not coprime")