import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a = (0 until n).map { 
        sc.nextInt()
     }

     abc155b(a)
}

fun abc155b(a: List<Int>) {
    var ans = "APPROVED"

    var ok = false
    a.filter { it % 2 == 0 }.forEach { 
        if (it % 3 != 0 && it % 5 != 0) {
            ok = true
        }
    }
    if (ok) {
        ans = "DENIED"
    }


    println(ans)
}
