object Main extends App {
  val n = scala.io.StdIn.readInt()
  val aInput = scala.io.StdIn.readLine()
  val aArray = aInput.split(" ").map(_.toInt).toVector

  var result = "APPROVED"
  aArray.foreach { a =>
    if (a % 2 == 0) {
      if (a % 3 != 0 && a % 5 != 0) {
        result = "DENIED"
      }
    }

  }
  println(result)

}