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

max_A = max(A)

import math

def factorization(n):
    arr = []
    temp = n
    for i in prime_list:
        if i > n:
            break

        if temp % i == 0:
            arr.append(i)

    return arr

def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n ** 0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

prime_list = primes(max_A)
prime_list.sort()

all_fact = []
for a in A:
    fact = factorization(a)
    all_fact += fact

if len(all_fact) == len(set(all_fact)):
    print("pairwise coprime")
else:
    ans = A[0]
    for i in range(1, N):
        ans = math.gcd(ans, A[i])
    if ans == 1:
        print("setwise coprime")
    else:
        print("not coprime")