object Main extends App {
  import scala.io.StdIn._
  val n = readInt()
  val a = readLine().split(" ").map(_.toInt)
  println(if(a.forall(x => x % 2 == 1 || x % 3 == 0 || x % 5 == 0)) "APPROVED" else "DENIED")
}