import sys
import numpy as np
sys = sys.stdin.buffer.readline
N = int(input())
A = np.array(list(map(int, input().split())))


def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


def make_prime(U):
    is_prime = np.zeros(U, np.bool)
    is_prime[2] = 1
    is_prime[3::2] = 1
    M = int(U**.5) + 1
    for p in range(3, M, 2):
        if is_prime[p]:
            is_prime[p * p::p + p] = 0
    return is_prime, is_prime.nonzero()[0]


def factorization(n):
    arr = []
    temp = n
    for i in range(2, n):
        if i * i > n:
            break
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(i)
    if temp != 1:
        arr.append(temp)
    if arr == []:
        arr.append(n)
    # if temp != 1:
    #     arr.append([temp, 1])
    # if arr == []:
    #     arr.append([n, 1])
    return arr


# A = sorted(A)
# print(f'{A=}')
is_prime, primes = make_prime(10**6)
primes = set(primes)
# print(primes)
arr = set(factorization(A[0]))
S = set([])
for a in A:
    # print(f'{a=}')
    tmp = set(factorization(a))
    # print(f'{arr=}, {tmp=}')
    arr = arr & tmp
    S = S | tmp
    # print(f'{arr=}, {S=}')

# print(np.count_nonzero(A % 2))
if len(arr) != 0:
    print('not coprime')
else:
    for s in S:
        if np.count_nonzero(A % s) >= 2:
            print('pairwise coprime')
            exit()
    print('setwise coprime')
