import numpy as np


def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError("n is int type.")
    if n < 2:
        raise ValueError("n is more than 2")
    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 prime + data
        prime.append(p)
        data = [e for e in data if e % p != 0]

    return data


N = int(input())
A = np.array(list(map(int, input().split())), dtype=np.int)
A = np.sort(A)

P = get_sieve_of_eratosthenes(int(A[-1] + 1))

ans = "pairwise coprime"
for p in P:
    q = [A % p == 0]
    s = np.sum(q)
    if s > 1:
        ans = "setwise coprime"

    if s == N:
        ans = "not coprime"
        break

print(ans)
