import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val a: List<Int> = (0 until n).map { sc.nextInt() }
    var result = "APPROVED"
    for (index in a.indices) {
        if (a[index] % 2 == 0) {
            if (a[index] % 3 != 0 && a[index] % 5 != 0) {
                result = "DENIED"
                break
            }
        }
    }
    println(result)
}