object Main extends App {
	val N = scala.io.StdIn.readInt
	val a = scala.io.StdIn.readLine.split(" ").map(_.toInt).filter(_%2 == 0)

	val even = a.size
	val cond = a.filter(z => z%3 == 0 || z%5 ==0)
	
	if(even == cond.size) println("APPROVED")
	else println("DENIED")
}