import sys
import resource
from collections import defaultdict

dic=set()
sys.setrecursionlimit(100000)

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

def prime_factorization(num):
    i=2
    tmp=set()
    while num >= i*i:
        while num%i==0:
            num//=i
            tmp.add(i)
        i+=1
    if num!=1: tmp.add(num)
    return tmp

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

s=a[0]
flag=0
for i in a:
    s=gcd(s,i)
    p=prime_factorization(i)
    for v in p:
        if v in dic:
            flag=1
        dic.add(v)
if not flag: print("pairwise coprime")
elif s==1: print("setwise coprime")
else: print("not coprime")