n=int(input())
a_list = list(map(int,input().split()))

def divisor(n):
    ass = []
    for i in range(1,int(n**0.5)+1):
        if n%i == 0:
            ass.append(i)
            if i**2 == n:
                continue
            ass.append(n//i)
    return ass #sortされていない

set_len_list = [0]*n
set_all = {1}
for i in range(n):
    set_i_tmp = set(prime_decomposition(a_list[i]))
    set_len_list[i] = len(set_i_tmp)
    set_all = set_all.union(set_i_tmp)
    if i == 0:
        set_int = set_i_tmp
    else:
        set_int = set_int.intersection(set_i_tmp)

if sum(set_len_list) == len(set_all)-1:
    print('pairwise coprime')
elif len(set_int) == 0:
    print('setwise coprime')
else:
    print('not coprime')