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

def gcd(a,b):
   while a%b:
     a,b=b,a%b
   return b

S=set()
for n in A:
  if n%2==0:
    if 2 in S:
      break
    else:
      S.add(2)
  while n%2==0:
    n//=2
  f=3
  o=False
  while f*f<=n:
    if n%f==0:
      if f in S:
        o=True
        break
      else:
        S.add(f)
    while n%f==0:
      n//=f
    f+=2
  if o==True:
    break
  if n!=1:
    S.add(n)
else:
  print('pairwise coprime')
  exit()

c=A[0]
for n in A:
  c=gcd(c,n)
  if c==1:
    print('setwise coprime')
    exit()

print('not coprime')
