function main(input) {
  var list = input[1].split(" ");
  var ans = "APPROVED";
  list.forEach(v=>{
    if(v%2==0){
      if(!(v%5==0||v%3==0)){
        ans = "DENIED";
      }
    }
  });
  console.log(ans);
}

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