function Main(input) {
	var line = input.split('\n');
	var line1 = line[1].split(' ');
	var n = parseInt(line[0], 10);
	var num = new Array(n);
	var f = 0;
	for(var i=0; i<n; i++){
		num[i] = parseInt(line1[i], 10);
		if(num[i]%2 == 0){
			if(!(num[i]%3 == 0 || num[i]%5 == 0)){
				f = 1;
			}
		}
	}
	if(f == 0){
		console.log('APPROVED');
	}else{
		console.log('DENIED');
	}
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
