n=int(input())
a=sorted(list(map(int,input().split())))
from math import gcd
from functools import reduce
def lcm(x,y):
  return (x*y)//gcd(x,y)
def lcm_list(l):
  return reduce(lcm,l,1)
def gcd_list(l):
    return reduce(gcd,l)
p=1
for i in a:
  p*=i
if p==lcm_list(a):
  print('pairwise coprime')
elif gcd_list(a)==1:
  print('setwise coprime')
else:
  print('not coprime')