function main(input) {
  var checks = input[1].split(" ");
  var evenNumbers = checks.filter(ele => ele%2 === 0);
  var checked = evenNumbers.filter(num => num%3 === 0 || num%5 === 0);

  if (evenNumbers.length === checked.length){
    console.log("APPROVED");
  } else {
    console.log("DENIED");
  }
  	
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));