import math

n = input()
a_list = [int(num) for num in input().split(" ")]

math.gcd(a_list[0], a_list[2])

def is_pairwise():
    for i in range(len(a_list)-1):
        for j in range(i+1, len(a_list)):
            if math.gcd(a_list[i], a_list[j]) != 1:
                return False
    return True

if is_pairwise():
    print("pairwise coprime")
    exit()

def is_setwise():
    prev_value = a_list[0]
    for i in range(1, len(a_list)):
        gcd = math.gcd(prev_value, a_list[i])
        if gcd == 1:
            return True
        prev_value = gcd
    return False

if is_setwise():
    print("setwise coprime")
    exit()

print("not coprime")
