n = int(input())
a = list(map(int, input().split()))
divide_minimam_prime = [0 for i in range(max(a) + 1)]
is_prime = [True for i in range(max(a) + 1)]
is_prime[0] = False
is_prime[1] = False
for div in range(max(a) + 1):
    if is_prime[div]:
        # divが素数だった場合
        k = div
        divide_minimam_prime[k] = k
        k += div
        while k <= max(a):
            is_prime[k] = False
            if divide_minimam_prime[k] == 0:
                divide_minimam_prime[k] = div
            k += div
    else:
        if divide_minimam_prime[div] == 0:
            divide_minimam_prime[div] = div
# pairwise coprimeであるかどうか？
pairwise_coprime = True
use_divnum = set()
for i in range(n):
    k = a[i]
    divnum_of_k = set()
    while k != 1:
        divnum_of_k.add(divide_minimam_prime[k])
        k = k // divide_minimam_prime[k]
    if len(use_divnum and divnum_of_k) >= 2:
        pairwise_coprime = False
        break
    else:
        use_divnum = use_divnum or divnum_of_k
if pairwise_coprime: 
    print("parwise coprime")
    exit()
from math import gcd
gcd_of_a = a[0]
for i in range(n):
    gcd_of_a = gcd(gcd_of_a, a[i])
if gcd_of_a == 1:
    print("setwise coprime")
else:
    print("not coprime")