from math import gcd

def lcm(x,y):
  return x*y//gcd(x,y)

n=int(input())

a=input().split()

gcd_all=10000000
lcm_all=1

for i in a:
  if gcd_all!=1:
    gcd_all=gcd(gcd_all,int(i))
  lcm_all=lcm(lcm_all,int(i))
  lcm_all=lcm_all//int(i)
  
if lcm_all==1:
  print("pairwise coprime")
elif gcd_all==1:
  print("setwise coprime")
else:
  print("not coprime")