import math
n=int(input())
a=list(map(int,input().split()))

def get_prime(n):
  res = [1]*(n+1)
  x = 2
  for i in range(2,x):
    if res[i]:
      for j in range(i*2,n+1,i):
        res[j] = 0
  return [i for i in range(2,n+1) if res[i]]

prime_list = {x:0 for x in get_prime(10**6+1)}
def check(i):
  x = 2
  m = i
  while x < math.sqrt(i):
    if m%x == 0:
      if prime_list[x]:
        return 0
      m //= x
      prime_list[x] = 1
      continue
    else:
      x += 1
  return 1

allwise = 1
if len([x for x in a if x > 1]) > len(prime_list.keys()):
  allwise = 0
else:
  allwise = check(a[0])
setwise = a[0]

for ai in a[1:]:
  if allwise:
    allwise = check(ai)
  setwise = math.gcd(setwise,ai)
  #print(ai,allwise,setwise)
if allwise:
  print('pairwise coprime')
elif setwise == 1:
  print('setwise coprime')
else:
  print('not coprime')