import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val n = scanner.nextInt()
    for (i in 0..n-1) {
        val value = scanner.nextInt()
        if (value % 2 == 0 && (value % 3 != 0 && value % 5 != 0)) {
            println("DENIED")
            return
        }
    }

    println("APPROVED")
}