object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val isApprovable = List.fill(sc.nextInt())(sc.nextInt())
    .forall(i => i % 2 == 1 || i % 3 == 0 || i % 5 == 0)
  println(if (isApprovable) "APPROVED" else "DENIED")
}
