import java.util.*

fun main(args: Array<String>) {
    val scn = Scanner(System.`in`)
    val N = scn.nextInt()

    var result = true
    for(i in 1..N){
        val A = scn.nextInt()

        if(A%2==0){
            if(A%3!=0 && A%5!=0){
                result=false
            }
        }
    }

    if(result){
        println("APPROVED")
    }else{
        println("DENIED")
    }

}