import math


n=int(input())
a=list(map(int,input().strip().split()))[:n]
f=0
for i in range(n):
  for j in range(i+1,n):
    if(math.gcd(a[i],a[j])!=1):
      f=1
      break
g=math.gcd(a[0],a[1])
for i in range(2,n):
  g=math.gcd(g,a[i])
#print(g)
if(f==0):
  print("pairwise coprime")
elif(f==1):
  if(g==1):
    print("setwise coprime")
  else:
    print("not coprime")