function Main(N) {
	N = N.split("\n");
	var flag = true;
	var arr = N[1].split(" ").map(Number);
	for(var i=0;i<arr.length;i++){
		if(arr[i]%2==0&&(arr[i]%3!=0&&arr[i]%5!=0)) flag = false
		//console.log((arr[i]%2==0),(arr[i]%3!=0),(arr[i]%5!=0));
	}
	if(flag) console.log("APPROVED");
	else console.log("DENIED")

}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());