fun main(args : Array<String>) {
    val numberSize = readLine()!!.toInt()
    val numberList = readLine()!!.split(" ").map { it.toInt() }
    var doubleCount = 0
    for (i in 0 until numberSize){
        if (numberList[i] % 2 == 0){
            doubleCount ++
            if (numberList[i] % 3 == 0 || numberList[i] % 5 == 0){
                doubleCount --
            }
        }
    }
    if (doubleCount == 0){
        println("APPROVED")
    }else{
        println("DENIED")
    }
}