fun main(args: Array<String>) {
    var n=readLine()!!.toInt()
    var nums=readLine()!!.split(" ").map { it.toInt() }
    var check=true
    for(num in nums){
        if(num%2==0){
            if(num%3!=0&&num%5!=0){
                println("DENIED")
                check=false
                break
            }
        }
    }
    if(check){
        println("APPROVED")
    }


}
