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

  val factors = Array.fill(m + 1)(List[Long]())

  def primeFactors(n: Int, res: List[Long] = Nil): List[Long] = {
    if (n == 1) {
      res
    } else if (factors(n).nonEmpty) {
      factors(n) ++ res
    } else {
      var i = 2L
      var d = 0L
      while (d == 0 && i * i <= n) {
        if (n % i == 0) {
          d = i
        }
        i += 1
      }

      val ans = {
        if (d != 0) {
          primeFactors(n / d.toInt, d :: res)
        } else {
          n.toLong :: res
        }
      }.distinct
      factors(n) = ans
      ans
    }
  }

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

  val pair = if (as.length >= 80000) {
    false
  } else {
    val exist = Array.fill(m + 1)(false)
    var p = true
    as.map(a => primeFactors(a.toInt)).foreach(fs =>
      for (f <- fs) {
        if (exist(f.toInt)) {
          p = false
        } else {
          exist(f.toInt) = true
        }
      }
    )
    p
  }

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