def get_sieve_of_eratosthenes(n):
    table = [i if i % 2 else 2 for i in range(n + 1)]
    prime = [2]
    limit = int(n ** 0.5)
    data = [i + 1 for i in range(2, n, 2)]
    while True:
        p = data[0]
        if limit <= p:
            return table, prime + data
        prime.append(p)
        next_data = []
        for e in data:
            if e % p != 0:
                next_data.append(e)
            else:
                table[e] = p
        data = next_data


N = int(input())
A = [int(i) for i in input().split()]
M = max(A)
if M > 2:
    table, primes = get_sieve_of_eratosthenes(M)
    Divisor = [0 for i in range(M + 1)]

    for a in A:
        aa = a
        while True:
            Divisor[table[aa]] += 1
            div = table[aa]
            while not aa % div:
                aa = aa // div
            if aa == 1:
                break

    Max_div = max(Divisor)
    #print(Max_div)
    if Max_div == 1:
        print("pairwise coprime")
    elif Max_div == N:
        print("not coprime")
    else:
        print("setwise coprime")

else:
    n = A.count(2)
    if n <= 1:
        print("pairwise coprime")
    elif n == N:
        print("not coprime")
    else:
        print("setwise coprime")