import scala.io.StdIn._

object Main extends App {


  val n = readInt()
  val A = readLine().split(" ").map(_.toInt)

  def solve() = {
    val isValid = A.map { num =>
      if(num % 2 == 0 && num % 5 != 0 && num % 3 != 0) false else true
    }.forall(identity)
    if(isValid) "APPROVED" else "DENIED"
  }

  println(solve())

}

