fun main (args:Array<String>){
    val n = readLine()!!.toInt()
    val numList = readLine()!!.split(" ").map(String::toInt)
    var even = mutableListOf<Int>()
    numList.forEach{
        if(it % 2 == 0){
            even.add(it)
        }
    }
    var count = 0
    even.forEach{
        if(it % 3 == 0 || it % 5 == 0){
            count++
        }
    }
    if(count == even.size) print("APPROVED")
    else print("DENIED")
}