"use strict";
function main(input) {
  let n = input[1].trim().split(" ");
  for(let i=0;i<n.length;i++){
    n[i] = parseInt(n[i]);
  }

  let judge = false;
  for(let i=0;i<n.length;i++){
    if (n[i]%2==0){
      if ((n[i]%3 !== 0) && (n[i]%5 !== 0)){
        judge = true;
        break;
      }
    }
  }
  console.log(judge?"DENIED":"APPROVED");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));