# -*- coding: utf-8 -*-
# map(int, input().split())
import math
from collections import defaultdict

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

def erathostenes(limit):
    a=list(range(2,limit+1))
    p=list()
    while a[0]**2<=limit:
	    tmp=a[0]
	    p.append(tmp)
	    a=[e for e in a if e%tmp!=0]
    p.extend(a)
    return p


prime_list = erathostenes(pow(10,3))
is_large_prime_list = [True for i in range(N)]

is_pairwise = True
is_setwise = True

for prime in prime_list:
    baisuu_cnt = 0
    baisuu_list = []
    for i in range(len(A)):
        if A[i]%prime == 0:
            is_large_prime_list[i] = False
            baisuu_cnt += 1
            baisuu_list.append(A[i])

    if baisuu_cnt >= 2:
        is_pairwise = False
    if baisuu_cnt == N:
        is_setwise = False

if is_setwise or is_pairwise:
    large_primes = [A[i] for i in range(N) if is_large_prime_list[i]]

    if len(set(large_primes)) != len(large_primes):
        is_pairwise = False
        is_setwise = False


if is_pairwise:
    print('pairwise coprime')
elif is_setwise:
    print('setwise coprime') 
else:
    print('not coprime')   