object Main extends App{
  val n = readInt
  val a = readLine.split(" ").map(_.toInt).toList

  val f: Int => Boolean = (n:Int) => n % 3 != 0 && n % 5 != 0
  val t = if( a.filter(_ % 2 == 0).filter(f).size == 0) "APPROVED" else "DENIED"
  println(t)
}