import sequtils, strutils, algorithm, math

const primes = (proc (): seq[int] =
  result = newSeq[int]()
  var sieve = newSeq[bool](1_000_000 + 5)
  for x in sieve.mitems:
    x = true
  sieve[0] = false
  sieve[1] = false
  for i in 2..high(sieve):
    if sieve[i]:
      result.add i
      for j in countup(i*i, high(sieve), i):
        sieve[j] = false
)()


let
  n = stdin.readline.parseInt
  bs = stdin.readline.split.map(parseInt)
var
  used = newSeq[bool](len(primes))

proc divisors(x:int): bool =
  for i, p in primes:
    if p > x:
      return true
    if x mod p == 0:
      if used[i]:
        return false
      used[i] = true
  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"
