import strutils,sequtils
import algorithm,sets,lists,critbits,sequtils,intsets,strutils,tables,math,heapqueue,future,deques

proc make_divisors(n: int): seq[int] = 
  var lower_divisors = newSeq[int]()
  var upper_divisors = newSeq[int]()
  for i in 1..<int(sqrt(float(n))+1):
    if n mod i == 0:
      lower_divisors.add(i)
      if i != n div i:
        upper_divisors.add(n div i)

  upper_divisors.reverse()
  return concat(lower_divisors, upper_divisors)

let read = iterator: string {.closure.} =
  while true:
    for s in stdin.readLine.split:
      yield s

let
  N = read().parseInt
  ai = stdin.readLine.split.map(parseInt).toHashSet.toSeq.sorted

var v = ai[0]
for i in 1..<ai.len:
  v = gcd(v, ai[i])

if v != 1:
  echo "not coprime"
  quit()

let n = 10^6
let ai_hash = ai.toHashSet
var searched = newSeqWith(n, true)
for i in 2..int(sqrt(float(n)) + 1):
  if not searched[i]:
    continue
  var
    j = 2
    idx = i
    cnt = 0
  while idx < n:
    if idx in ai_hash:
      cnt += 1
    searched[idx] = false
    j += 1
    idx = i * j
  if cnt > 1:
    echo "setwise coprime"
    quit()

echo "pairwise coprime"
