import collections
from math import gcd
import sys

MAXN = 10**6+10
sieve = [i for i in range(MAXN+1)]
p = 2
while p*p <= MAXN:
    if sieve[p] == p:
        for q in range(2*p,MAXN+1,p):
            if sieve[q] == q:
                sieve[q] = p
    p += 1
    
def pf(a):
    tmp = set()
    while a > 1:
        tmp.add(sieve[a])
        a //= sieve[a]
        
    return list(tmp)

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

A=[i for i in A if i != 1]

g = 0
for a in A:
    g = gcd(g,a)
if g > 1:
    print('not coprime')
    sys.exit()
    

B=[pf(A[i]) for i in range(len(A))]
B=sum(B,[])

if len(B) == len(set(B)):
    print("pairwise coprime")
    
else:
    print("setwise coprime")