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

from functools import lru_cache
@lru_cache(None)

def gcd(x,y):
    if y>x:
        x,y=y,x
    if y==0:
        return x
    else:
        return gcd(y,x-y)

pairwise=True
setwise=True
gcds=[]
for i in range(N):
    for j in range(i+1,N):
        g=gcd(A[i],A[j])
        print(i,j)
        print("gcd:",g)
        if g in gcds:
            setwise=False
        else:
            gcds.append(g)
        print(gcds)
        if g > 1:
            pairwise=False
        if pairwise==False and setwise==False:
            break
    if pairwise==False and setwise==False:
        break
        

if pairwise==True:
    print("pairwise coprime")
elif setwise==True:
    print("setwise coprime")
else:
    print("not coprime")