import kotlin.math.sqrt

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

    val high = arr.max()!!

    val divisors = IntArray(high + 1)

    for (i in 0 until n) {
        var j = 1
        while (j <= sqrt(arr[i].toDouble())) {
            if (arr[i] % j == 0) {
                divisors[j]++
                if (j != arr[i] / j) divisors[arr[i] / j]++
            }
            j++
        }
    }

    var ans = 1
    for (i in high downTo 1)
        if (divisors[i] > 1) {
            ans = i
            break
        }

    if (ans == 1) {
        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)
}