from math import gcd
n=int(input())
l=list(map(int,input().split()))
mal=max(l)
e=[0 for i in range(mal+1)]

import numpy as np
def searchPrimeNum(N):
    ma = int(np.sqrt(N))
    searchList = [i for i in range(2,N+1)]
    primeNum = []
    while searchList[0] <= ma:
        primeNum.append(searchList[0])
        tmp = searchList[0]
        for i in searchList:
            if i%tmp==0:
                e[i]=tmp
        searchList = [i for i in searchList if i % tmp != 0]
        primeNum.extend(searchList)
    return primeNum
searchPrimeNum(mal)
#print(e)
s=set([])
f=0
for i in range(n):
    p=l[i]
    t=set([])
    while e[p]!=0:
        t.add(e[p])
        p//=e[p]
    if p>=2:
        t.add(p)
    if len(s&t)>0:
        f=1
        break
    s=s|t

if f==0:
    print('pairwise coprime')
    exit()
p=l[0]
for i in range(1,n):
    p=gcd(p,l[i])
if p==1:
    print('setwise coprime')
else:
    print('not coprime')