import kotlin.math.*
import java.util.*

const val MOD = 1_000_000_007L

fun readI() = readLine()!!.toInt()
fun readL() = readLine()!!.toLong()
fun readD() = readLine()!!.toDouble()
fun readIs() = readLine()!!.split(' ').map(String::toInt)
fun readLs() = readLine()!!.split(' ').map(String::toLong)
fun readDs() = readLine()!!.split(' ').map(String::toDouble)

/**
 * Euclidの互除法による最大公約数算出.
 *
 * 計算量: `O(log min(a, b))`
 */
tailrec fun gcd(a: Int, b: Int): Int {
  if (a == 0) return b
  var x = a
  var y = b
  if (y < x) {
    x = b
    y = a
  }
  return gcd(y % x, x)
}

/**
 * Eratosthenesの篩による素数列挙.
 *
 * 計算量：`O(n log log n)`
 */
fun sieve(n: Int): Collection<Int> {
  val primes = (2..n).toSortedSet()
  for (i in 2..sqrt(n.toDouble()).toInt()) {
    if (i !in primes) continue
    ((i + i)..n step i).forEach { primes.remove(it) }
  }
  return primes
}

fun main() {
  val n = readI()
  val aa = readIs()
  run {
    val at = BooleanArray(1_000_001)
    var maxa = 0
    aa.forEach {
      if (it != 1 && at[it]) return@run
      maxa = max(maxa, it)
      at[it] = true
    }
    val pr = sieve(maxa)
    for (p in pr) {
      var t = 0
      for (q in p..maxa step p) {
        if (at[q]) {
          t++
          if (t == 2) return@run
        }
      }
    }
    println("pairwise coprime")
    return
  }
  var t = gcd(aa[0], aa[1])
  for (i in 2 until n) {
    t = gcd(t, aa[i])
  }
  println(if (t == 1) "setwise coprime" else "not coprime")
}
