from math import gcd

n = int(input())
a = list(map(int,input().split()))
i,g = n-2,a[n-1]
pc = True
while i >= 0:
  res = gcd(g,a[i])
  if res != 1:
    pc = False
    break
  g *= a[i]
  i -= 1
if not pc:
  i,g = n-2,a[n-1]
  while i >= 0:
    g = gcd(g,a[i])
    i -= 1
  if g != 1:
    print("not coprime")
  else:
    print("setwise coprime")
else:
  print("pairwise coprime")