import math
from functools import reduce

n=int(input())
a=list(map(int,input().split()))
mxa=max(a)

           
flg=True
table=[0]*(mxa+1)
for (i,x) in zip(a,range(len(a))):
  if i==1:
    continue
  fc=[]
  tmp=i
  for j in range(2, int(-(-num**0.5//1))+1):
    if tmp%j==0:
      while tmp%j==0:
        temp//=j
      fc.append(j)
  if tmp!=1:
    arr.append(tmp)
  if fc==[]:
    arr.append(tmp)
  for j in fc:
    if table[j]==1:
      flg=False
      break
    table[j]+=1

g=a[0]
for i in a[1:]:
  g=math.gcd(g,i)
    
if flg:
  print("pairwise coprime")
elif g==1:
  print("setwise coprime")
else:
  print("not coprime")

