object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n = sc.nextInt()
  val as = List.fill(n)(sc.nextLong())
  val m = 1000000

  val c = Array.fill(m+1)(0)
  as.foreach(a => c(a.toInt) += 1)

  var pair = true
  for (i <- 2 to m) {
    var count = 0
    var k = 1
    while (i * k <= m) {
      count += c(i * k)
      k += 1
    }
    if (count > 1) {
      pair = false
    }
  }

  def gcd(a: Long, b: Long): Long = {
    if (b == 0) a else gcd(b, a % b)
  }

  if (pair) {
    println("pairwise coprime")
  } else if (as.reduceLeft[Long]{case (x, y) => gcd(x, y)} == 1) {
    println("setwise coprime")
  } else {
    println("not coprime")
  }
}
