import java.math.BigInteger

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

    var product = BigInteger.valueOf(1L)
    arr.forEach {
        product = product.multiply(BigInteger.valueOf(it))
    }
    var ans = BigInteger.ONE
    for (i in arr.indices) {
        ans = lcm(ans, BigInteger.valueOf(arr[i]))
    }
    if (ans == product) {
        println("pairwise coprime")
        return
    }

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

    println("not coprime")
}

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

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