object Main extends App {
	val sc = new java.util.Scanner(System.in)
	val pw = new java.io.PrintWriter(System.out)

	val a = Seq.fill(sc.nextInt)(sc.nextInt)
	
	pw.println(if (a.filter(_ % 2 == 0).forall(ai => (ai % 3 == 0) || (ai % 5 == 0))) "APPROVED" else "DENIED")
	pw.flush()
}