n = int(input())
*a,=map(int, input().split())
mapa=[0]*(10**6+1)

n0 = 10**6
primes = [0]*(n0+1)
for i in range(2, int(n0**0.5+1)):
    if primes[i]==0:
        x=i
        multi=1
        while x<=n0:
            if primes[x]==0:
                primes[x]=i
            x//=multi
            multi+=1
            x*=multi

def func(m):
    while m>1:
        mapa[primes[m]]+=1
        while m>1 and m%primes[m]==0:
            m//=primes[m]

for ai in a:
    func(ai)

tmp=max(mapa)
# print(mapa[:20])
if tmp==n:
    print('not coprime')
elif tmp>1:
    print('setwise coprime')
else:
    print('pairwise coprime')