import java.util.*

fun main() {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

class Sieve(max: Int) {
    private val f = IntArray(max + 1)

    init {
        f[0] = -1
        f[1] = -1
        for (i in 2..max) {
            if (f[i] > 0) continue
            for (j in i..max step i) {
                f[j] = i
            }
        }
    }

    fun factors(x: Int): Set<Int> {
        val result = mutableSetOf<Int>()
        var i = x
        while (i != 1) {
            result.add(f[i])
            i /= f[i]
        }
        return result
    }
}

object Problem {
    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val N = sc.next().toInt()
        val A = Array(N) { sc.next().toInt() }
        val s = Sieve(1000000)
        val fs = HashMap<Int, Int>()
        A.forEach { a ->
            s.factors(a).forEach { f ->
                fs[f] = (fs[f] ?: 0) + 1
            }
        }
        //dprint(fs)
        val max = fs.values.max()!!
        when (max) {
            1 -> pw.println("pairwise coprime")
            N -> pw.println("not coprime")
            else -> pw.println("setwise coprime")
        }
    }
}
