import sequtils, strutils, algorithm, math, sets

let
  n = stdin.readline.parseInt
  bs = stdin.readline.split.map(parseInt)
var
  used = initHashSet[int]()

proc divisors(x:int): bool =
  for d in 2..(int(sqrt(float(x))) + 1):
    if x mod d == 0:
      if (d in used) or (x div d in used):
        return false
      used.incl d
      used.incl (x div d)
  return true

var is_pairwise = true
for b in bs:
  if not divisors(b):
    is_pairwise = false
    break
if is_pairwise:
  echo "pairwise coprime"
  quit 0

if bs.foldl(gcd(a, b)) == 1:
  echo "setwise coprime"
  quit 0

echo "not coprime"
