import scala.io.Source

object Main extends App {
  val List(nStr, xsStr) = Source.stdin.getLines().toList
  val n: Int = n.toInt
  val xs: List[Int] = xsStr.split(' ').map(_.toInt).toList
  
  val isDenied = xs.exists { x =>
    x % 2 == 0 && !(x % 3 == 0 || x % 5 == 0)
  }
  
  if (isDenied)
    println("DENIED")
  else
  	println("APPROVED")
}