object Main extends App {
  val n = io.StdIn.readLine()
  val line = io.StdIn.readLine().split(" ").map(_.toInt)

  var flag = true
  for(o <- line){
    if(o % 2 == 0 && o%3 != 0 && o %5 != 0) flag = false
  }

  if(flag) println(s"APPROVED")
  else println(s"DENIED")
}
