n=int(input())
a=[int(x) for x in input().split()]

def gcd(a,b):#最大公約数
  while b!=0:
    a,b=b,a%b
  return a

ans=0
now=a[0]
flag_1=0
flag_2=0
flag_all=0
for i in range(1,n):
  now=gcd(now,a[i])
  if now==1:
    flag_1+=1
  else:
    flag_2+=1
  


# print(now)
# print(flag_1,flag_2)
if flag_1!=0 and flag_2==0 and now==1:
  print("pairwise coprime")
elif now==1 and flag_2!=0 and flag_1==1:
  print("setwise coprime")
else:
  print("not coprime")