import math
 
 
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []
 
    while True:
        prime = min(A)
 
        if prime > math.sqrt(limit):
            break
 
        P.append(prime)
 
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
 
    for a in A:
        P.append(a)
 
    return P
 
 
er = eratosthenes(1500)
s_er = set(er)
 
 
def make_divisors(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if i not in s_er:
            continue
        if temp % i == 0:
            arr.append(i)
 
    if temp != 1:
        arr.append(temp)
 
    if arr == []:
        arr.append(n)
 
    a = set(arr)
    if 1 in a:
        a.remove(1)
 
    return a
 
 
n = int(input())
a = list(map(int, input().split()))
 
is_pairwise = True
is_setwise = False
 
f_set = set()
n_set = set()
 
for item in a:
    if item in n_set:
        is_pairwise = False
        break
    else:
        if item != 1:
            n_set.add(item)
    for fc in make_divisors(item):
        if fc in f_set:
            is_pairwise = False
            break
        else:
            f_set.add(fc)
    if not is_pairwise:
        break
 
if is_pairwise:
    print('pairwise coprime')
elif is_setwise:
    print('setwise coprime')
else:
    print('not coprime')