import java.util.Scanner

object Main extends App {

  val sc = new Scanner(System.in)
  val n = sc.nextLine()
  val anStr = sc.nextLine()
  val an = anStr.split(" ")

  val res = an.map(_.toInt).map(ju)

  if (res.contains(false)) println("DENIED") else println("APPROVED")

  def ju(i: Int): Boolean = {
    if (i % 2 != 0) {
      true
    } else if ((i % 3 == 0) || (i % 5 == 0)) {
      true
    } else {
      false
    }
  }
}

