"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const N = parseInt(arg[0]);
    const A = arg[1].split(" ").map(n=>parseInt(n));
    
    const evens = A.filter(n=>n % 2 === 0);
    
    console.log(evens.filter(n=>n % 3 === 0 || n % 5 === 0).length == evens.length ? "APPROVED" : "DENIED");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));