fun main (arg: Array<String>){
	var N = readLine()!!.toInt()
    var list= readLine()!!.split(" ").map(String::toInt)
	var flag = 0
	for(i in 0..N-1){
		var tmp = list[i]
		if(tmp%2 == 0){
			if(tmp%3 != 0 && tmp%5 != 0){
				flag = 1
				break
			}
		} 
	}
	if(flag == 0){
		println("APPROVED")
	}else{
		println("DENIED")
	}
}