from math import gcd

if __name__ == '__main__':

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

    gcd_ = gcd(A[0], A[1])
    for i in range(2, len(A)):
        gcd_ = gcd(gcd_, A[i])

    set_wise = False
    if gcd_ == 1:
        set_wise = True
    if not(set_wise):
        print("not coprime")
    else:
        pairwise = True
        for i in range(n):
            for j in range(i+1, n):
                gcd_ = gcd(A[i], A[j])
                if gcd_ != 1:
                    pairwise = False
        if pairwise:
            print("pairwise coprime")
        else:
            print("setwise coprime")




