


import scala.annotation.tailrec
import scala.collection.mutable
import scala.io.StdIn._
object Main extends App {
  val n = readInt()
  val num = readLine.trim.split(' ').map(_.toInt)
  println{
    if (num.forall{i ⇒ (i % 2 == 1) || (i % 3 == 0) || (i % 5 == 0)}) "APPROVED" else "DENIED"
  }
}
