"use strict";
const main = arg => {
  	const rows = arg.trim().split("\n");
  	const is3or5 = (n)=> {return (n%3||n%5)}
  	let N = rows[0]*1;
   	let targetArr = rows[1].split(" ").map(x => x*1).filter(x => {return !(x%2)});
  	let ans = "APPROVED";	
  	for(let i = 0; i < targetArr.length; i++){
    	if(!(targetArr[i]%3 ==0 || targetArr[i]%5 ==0)){
        	ans = "DENIED";
        }
    }
  console.log(ans);
  	
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));