fun main(args: Array<String>) {
  val n = readLine()!!
  val array = readLine()!!.split(" ").map(String::toInt)
  val evens = array.filter{it%2 == 0}
  val denied =  evens.filter{it%3 != 0 && it%5 != 0}
  println(if(denied.size > 0) "DENIED" else "APPROVED")
}