def gcd(a,b):
  if b==0:
    return a
  else:
    return gcd(b,a%b)
n=int(input())
l=list(map(int,input().split())) 
c=0
h=list(filter(lambda x: x%2==0,l))
e=0
for i in h:
    if i==0:
        e=e+1
if e==n:
    print('not coprime')
else:
    for i in range(0,n):
        t=l[i%n]
        y=l[(i+1)%n]
        s=min(t,y)
        p=max(t,y)
        f=gcd(p,s)
        if f==1:
            c=c+1
    if c==3:
        print('pairwise  coprime')
    else:
        f=l[0]
        y=l[1]
        a=max(f,y)
        b=min(f,y)
        r=gcd(a,b)
        for w in range(2,len(l)):
            r=gcd(r,l[i])
        if r==1:
            print('setwise  coprime')
        else:
            print('not coprime')