import math
m = int(input())
a = list(map(int, input().split()))
max_int = math.ceil(math.sqrt(a[m-1]))

flg = 0
for i in range(max_int-1):
  tmp = list(map(lambda x: x % (i+2), a))
  c = tmp.count(0)
  if c == m:
    flg = 2
    break
  elif c >= 2:
    flg = 1
  
if flg == 1:
  print("setwise coprime")
elif flg == 2:
  print("not coprime")
else:
  print("pairwise coprime")