
import java.math.BigInteger


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
    }

    var x = BigInteger(a.first().toString())
    a.drop(1).map { BigInteger(it.toString()) }.forEach { y ->
        if (gcd(x, y) != BigInteger.ONE) {
            println(B)
            return
        }

        x = lcm(x, y)
    }

    println(A)
}

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

fun gcd(a: BigInteger, b: BigInteger): BigInteger {
    if (a.mod(b) == BigInteger.ZERO) return b
    else return gcd(b, a % b)
}

fun lcm(a: BigInteger, b: BigInteger): BigInteger {
    return a * b / gcd(a, b)
}

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

