n=int(input())
A=set(map(int,input().split()))
ma=max(A)
data=[i for i in range(2,ma+1)]
pco=True
sco=True
while len(data)>1:
  d=data[0]
  if d>ma**0.5:break
  one=d in A
  new=[]
  if one:k=1
  else:k=0
  for e in data[1:]:
    if e%d==0:
      k+=1
      if e in A:
        if one:pco=False
        else:one=True
    else:
      new.append(e)
  if k==n:
    sco=False
    break
  data=new
if pco:
  print('pairwise coprime')
elif sco:
  print('setwise coprime')
else:
  print('not coprime')