import math

memo_dic = dict()

def is_pairwise(li) :
    for i in range(len(li)) :
        for k in range(i+1,len(li)) :
            res = math.gcd(li[i],li[k])
            key = str(li[i]) + "_" + str(li[k])
            memo_dic[key] = res
            if (res != 1) :
                return False
    return True

def is_setwise(li) :
    a = 0
    key = str(li[0]) + "_" + str(li[1])
    if (key in memo_dic) :
        a = memo_dic[key]
    else :
        a = math.gcd(li[0],li[1])

    for i in range(2,len(li)) :
        a = math.gcd(a,li[i])
        if (a == 1) :
            break
    
    if (a == 1) :
        return True
    else :
        return False


def main() :
    N = int(input())
    a_list = [int(i) for i in input().split()]

    result = is_pairwise(a_list)
    if(result) :
        print("pairwise coprime")
        return
    
    result = is_setwise(a_list)
    if (result) :
        print("setwise coprime")
    else :
        print("not coprime")


main()