import math
import fractions

def get_prime(number):
    prime_list = []
    search_list = list(range(2,number + 1))
    i = 0
    while search_list[i] <= math.sqrt(number):
        head_num = search_list[i]
        search_list = [(num if num % head_num != 0 else head_num) for num in search_list]
        i += 1
    return search_list

def factrization_prime(number,D):
    factor = []
    p = 1
    while(number != 1):
        old_p = p
        p = D[number-2]
        number = number // p
        if p != old_p:
            factor.append(p)
    return factor

N = int(input())
a = list(map(int,input().split()))
D = get_prime(max(a))
fact_p_list = []
for i in range(N):
    fact_p_list += factrization_prime(a[i],D)

ans = a[0]
for i in range(1, N):
    ans = fractions.gcd(ans, a[i])

if len(fact_p_list) == len(set(fact_p_list)):
    print("pairwise coprime")
elif ans == 1:
    print("setwise coprime")
else:
    print("not coprime")
