import math
n=int(input())
a=list(map(int,input().split()))
mxa=max(a)

def get_sieve_of_eratosthenes(mxa):
    fact = [0]*(mxa+1)
    limit = math.sqrt(mxa)
    data = [i + 1 for i in range(1, mxa)]
    while True:
        p = data[0]
        if limit <= p:
            return fact
        fact[p]=p
        for i in data:
            if i%p==0:
                fact[i]=p
        data = [e for e in data if e % p != 0]

fact= get_sieve_of_eratosthenes(mxa)

for i,j in enumerate(fact):
    if j==0:
        fact[i]=i
lst=[0]*(len(fact))
for i in range(n):
    prm_check = [False]*(mxa+1)
    while a[i]!=1:
        if not prm_check[fact[a[i]]]:
            lst[fact[a[i]]]+=1
            prm_check[fact[a[i]]] = True
        a[i]//=fact[a[i]]


pair=True
st=True

for i in lst:
    if i>=2:
        pair=False
    if i==n:
        st=False

if pair:
    print("pairwise coprime")
elif st:
    print("setwise coprime")
else:
    print("not coprime")
