"use strict"
function Main(input) {
  input = input.trim().split('\n');
  const N = input[0];
  const A = input[1].trim().split(' ').map(Number);

  let ret = 'APPROVED';
  for(let i=0; i<N; i++){
    let tmp = A[i];
    let flg = true;
    if(tmp % 2 === 0 && tmp % 3 === 0){
      flg = false;
    };

    if(tmp % 2 === 0 && tmp % 5 === 0){
      flg = false;
    }

    if(tmp % 2 === 0 && flg){
      ret = 'DENIED';
    }
  };


  console.log(ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));