import itertools
import collections
n=int(input())
a=list(map(int,input().split()))
l=[]
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(i)

    if temp!=1:
        arr.append(temp)

    if arr==[]:
        arr.append(n)

    return arr

for i in range(n):
    k=factorization(a[i])
    l.append(k)


l=list(itertools.chain.from_iterable(l))
c=len(l)
cl = collections.Counter(l)
cl1=cl.most_common()[0][1]
if c==n:print('pairwise coprime')
elif cl1<n:print('setwise coprime')
else:print('not coprime')