import java.math.BigInteger

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val arr = readLine()!!.split(' ').map { it.toInt() }

    var mul = BigInteger.valueOf(1L)
    arr.forEach {
        mul = mul.multiply(BigInteger.valueOf(it.toLong()))
    }
    var ans = BigInteger.ZERO
    for (i in arr) {
        ans = maxOf(ans, gcd(BigInteger.valueOf(i.toLong()), mul.divide(BigInteger.valueOf(i.toLong()))))
    }
    if (ans == BigInteger.ONE) {
        println("pairwise coprime")
        return
    }

    var result = 0
    for (element in arr) {
        result = gcd(result, element)
        if (result == 1) {
            println("setwise coprime")
            return
        }
    }

    println("not coprime")
}

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

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