import io.StdIn._

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

  require(1 <= n && n <= 100)
  require(arr.forall(a => 1 <= a && a <= 1000))

  if (arr.forall(a =>
        if (a % 2 == 0)
          if (a % 3 == 0 || a % 5 == 0) true else false
        else true
      )) println("APPROVE")
  else println("DENIED")
}
