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

  val evens = a.filter(_ % 2 == 0)
  val evensSelect = evens.filter(x => x % 3 == 0 || x % 5 == 0)
  println(if(evens.length == evensSelect.length) "APPROVED" else "DENIED")
}