"use strict";
const Main = (input) =>{
   let xs = input.trim().split('\n');
   let xs1 = xs[1].trim().split(' ').map(v=>parseInt(v,10));
   let N = Number(xs[0]);
   let A = xs1.filter(v=>v % 2 === 0);
   let ans = 0;
   for(let i=0; i<A.length; i++){
     if(A[i]%3==0 || A[i]%5==0){
     ans+=1;
     }else{
     ans+=0;
     }
   }
   
   if(ans==A.length){ // && ans!=0
     console.log('APPROVED');
   }else{
     console.log('DENIED');
   }
   
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));