import itertools
import collections
n=int(input())
a=list(map(int,input().split()))
l=[]

def fermat(limit):
    n = 0
    for k in range(2, limit+1):
        if k % 2 == 0 and k != 2:
            continue
            
        if pow(2, k-1, k) == 1:
            n += 1
            
    return n

for i in range(n):
    k=fermat(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')