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
m=0
for i in f:
    m=max(m,f[i])
if f=={} or m==1:
    print('pairwise coprime')
elif m>1 and m<n:
    print('setwise coprime')
else:
    print('not coprime')