import math as m

N=int(input())
As=list(map(int,input().split()))


D=[0]*(10**6+1)
D[1]=1
for i in range(2,int(m.sqrt(10**6))+2):
    if D[i]!=0:
        continue
    j=i
    while j < 10**6+1:
        D[j]=i
        j+=i

P=[0]*10**6
pc=True
g=As[0]
for n in range(N):
    A=As[n]
    ppre=1
    while True:
        p=D[A]
        if ppre != p:
            if P[p] > 0:
                pc=False
            P[p]+=1
            ppre=p
        A=A//p
        if A==1:
            break
    g=m.gcd(g,A)

if pc:
    print('pairwise coprime')
elif g==1:
    print('setwise coprime')
else:
    print('not coprime')
