import math

n=int(input())
a=[int(s) for s in (input().split())]

pMax=math.floor(math.sqrt(max(a)))
pList=[]

pairwise=True
setwise=True

for i in range(2,pMax+1):
    isPrime=True
    sqI=math.ceil(math.sqrt(i))
    subset=[k for k in pList if sqI >= k]
    for j in subset:
        if i%j==0:
            isPrime=False
            break
    if isPrime:
        pList.append(i)
        nDiv=sum([k%i==0 for k in a])

        if nDiv>1:
            pairwise=False
        if nDiv==n:
            setwise=False
            break

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

