import math
n=int(input())
l=list(map(int,input().split()))
c=l[0]
aa=0
for i in range(1,n):
    c=math.gcd(l[i],c)
prime=[2,3,5,7,11,13,17,19,23]
count=[0]*9
for i in range(n):
    for j in range(9):
        if(l[i]%prime[j]==0):
            count[j]+=1
        if(count[j]>=2):
            aa=1
            break   
if(aa==0 and c==1):
    print("pairwise coprime")
elif(c==1):
    print("setwise coprime")
else:
    print("not coprime")
