import java.io.BufferedReader
import java.io.InputStreamReader

@Suppress("LocalVariableName")
fun main(a: Array<String>) {
    val reader = BufferedReader(InputStreamReader(System.`in`))
    val N = reader.readLine().toInt() - 1
    val args = reader.readLine().split(" ")
    val A = (0..N).map { args[it].toInt() }.filter { it % 2 == 0 }
    if (A.filterNot { it % 5 == 0 || it % 3 == 0 }.isEmpty()) {
        println("APPROVED")
    } else {
        println("DENIED")
    }
}
