import scala.io.StdIn._
object Main extends App {
  readLine
  if (readLine
        .split(" ")
        .forall(s => {
          val i = s.toInt
          (i % 2 != 0) || (i % 3 == 0 || i % 5 == 0)
        })) {
    println("APPROVED")
  } else {
    println("DENIED")
  }
}
