fun main(args: Array<String>) {
    val N = nextInt()
    val A = listOfInt()
    val ans = A.all {
        if (it % 2 == 0) {
            (it % 3 == 0 || it % 5 == 0)
        } else true
    }
    println(if (ans) "APPROVED" else "DENIED")
}
fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt(delta: Int = 0) = listOfString().map { Integer.parseInt(it) + delta }
fun printErr(value: Any) = System.err.println(value)
