N = int(input())
A = list(map(int, input().split()))
MAX= 10**6

from math import gcd
g = A[0]
# g_list = [A[0]]
for i in range(1, N):
    g = gcd(g, A[i])
    # g_list.append(g)
if g != 1:
    print("not coprime")
    exit()
else:
    A = [a for a in A if a != 1]
    n_primes = 78498
    if N > n_primes:
        print("setwise coprime")
        exit()
    else:
        def makePrimeChecker(n):
            """
            エラトステネスの篩.
            nまでの自然数が素数かどうかを表すリストを返す.
            """
            isPrime = [True] * (n + 1)
            isPrime[0] = False
            isPrime[1] = False
            for i in range(2, int(n ** 0.5) + 1):
                if isPrime[i]:
                    for j in range(i * i, n + 1, i):
                        isPrime[j] = False
            return isPrime

        is_prime = makePrimeChecker(MAX)
        is_ok = 1
        used_prime = [0]*(MAX+1)
        primes = [n for n in range(2, MAX+1) if is_prime[n]]
        i = 0
        for p in primes:
            for a in A:
                i += 1
                if a % p == 0:
                    if used_prime[p]:
                        is_ok = 0
                        break
                    used_prime[p] = 1
            if i >= 10**6 * 5:
                break
            if not is_ok:
                break
            
        if is_ok:
            print("pairwise coprime")
        else:
            print("setwise coprime")
