ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
gcd=math.gcd

def is_primes(n):
    primes = [True]*n
    primes[0] =False
    primes[1] =False
    p = 2
    while p*p <=n:
        if primes[p]:
            for q in range(2*p,n,p):
                primes[q] = False
        p+=1
    return primes

def factorize(n,primes):
    fct = [(1,1)]
    for b in primes:#primes ::sorted
        if b**2 > n:
            break
        cnt =0
        while n % b == 0:
            n //= b
            cnt +=1
        if cnt >=1:
            fct.append((b,cnt))
    if n > 1:
        fct.append((n,1))
    return fct

n =ni()
A = lma()
tmp=0
for a in A:
    tmp = gcd(a,tmp)
if tmp!= 1:
    print("not coprime")
    exit()
mx= 10**6+10
prms = is_primes(mx)
prms2=[i for i in range(mx) if prms[i]]
#print(prms2)
d=collections.Counter()
for a in A:
    fct = factorize(a,prms2)
    print(fct)
    for fc,cnt in fct:
        if cnt>=1:
            d[fc]+=1

f1=True # pp or sp
f2=True # sp or not p
for num,cnt in d.items():
    if num==1:
        continue
    if cnt==n:
        f2=False #全体で共通の約数になる
        break
    else:
        if cnt==1:
            pass
        else:
            f1=False
            break

if f2==False:
    print("not coprime")
elif f1:
    print("pairwise coprime")
else:
    print("setwise coprime")
