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

from bisect import bisect_left

n0 = 10**6
primes = set(range(2, n0+1))
for i in range(2, int(n0**0.5+1)):
    primes.difference_update(range(i*2, n0+1, i))
primes=list(primes)
maxp=primes[-1]

def isPrime(m):
    b=bisect_left(primes, m)
    return m<=maxp and primes[b]==m

def func(m):
    for i in range(2,int(m**0.5)+2):
        if isPrime(m):
            break
        else:
            if m%i==0:
                mapa[i]+=1
                while m%i==0:
                    m//=i
    if m>1:
        mapa[m]+=1

for ai in a:
    func(ai)

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