object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt()
    val numbers: Array[Int] = Array.fill(n)(sc.nextInt())

    val ans = numbers.forall(
      input =>
        if (input % 2 == 0) {
          input % 3 == 0 || input % 5 == 0
        } else {
          true
      }
    )

    println(if (ans) "APPROVED" else "DENIED")
  }
}
