def hcfnaive(a,b): 
    if(b==0): 
        return a 
    else: 
        return hcfnaive(b,a%b) 
n=int(input())
l=list(map(int,input().split()))
f={}
for i in range(n):
    x=l[i]
    for i in range(2,int(x**(0.5))+1):
        if x%i==0:
            f[i]=f.get(i,0)+1
            while x%i==0:
                x=x//i
    if x>1:
        f[x]=f.get(x,0)+1
g=l[0]
for i in range(1,n):
    g=hcfnaive(g,l[i])
m=0
for i in f:
    m=max(m,f[i])
if g==1 and (f=={} or m==1):
    print('pairwise coprime')
elif g==1 and m>1:
    print('setwise coprime')
elif g>1:
    print('not coprime')