
def find_gcd(x, y): 
    while(y): 
        x, y = y, x % y 
    return x 
def fun(l):
  num1=l[0] 
  num2=l[1] 
  gcd=find_gcd(num1,num2) 

  for i in range(2,len(l)):
    gcd=find_gcd(gcd,l[i])
  if gcd==1:
    print("setwise coprime")
    return 1
  for i range(len(l)-1):
    gcd=find_gcd(l[i],l[i+1])
    if gcd!=1:
      break;
  else:
    print("pairwise coprime")
    return 1
n=int(input())
l=[]
for in range(n):
  temp=int(input())
  l.append(temp)
x=fun(l)
if x!=1:
  print("not coprime")
    
    
    
   
 
  
      

  

