
const val A = "pairwise coprime"
const val B = "setwise coprime"
const val C = "not coprime"
fun main(args: Array<String>) {
    val n = getInt()
    val a = getInts()

    val g = a.reduce(::gcd)
    if (g != 1) {
        println(C)
        return
    }

    val p = ArrayList<Int>()
    fun prime(k: Int): Boolean {
        return p.takeWhile { it * it <= k }.all { k % it != 0 }
    }

    p.add(2)
    (3..999).filter { it % 2 == 1 }.forEach {
        if (prime(it)) p.add(it)
    }

    p.forEach { pp ->
        if (a.count { it % pp == 0 } >= 2) {
            println(B)
            return
        }
    }
    println(A)
}

fun gcd(a: Int, b: Int): Int {
    if (a % b == 0) return b
    else return gcd(b, a % b)
}


fun getInt() = readLine()!!.toInt()
fun getInts() = readLine()!!.split(" ").map { it.toInt() }
fun getLong() = readLine()!!.toLong()
fun getLongs() = readLine()!!.split(" ").map { it.toLong() }

