import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val _ = in.readLine()
    val as = in.readLine().split("\\s+").map(_.toInt)

    System.out.println(
      if(as.filter(_ % 2 == 0).forall(a => a % 3 == 0 || a % 5 == 0)) {
        "APPROVED"
      } else {
        "DENIED"
      }
    )
  }
}
