function main(input) {
    input = input.trim().split("\n");
    var a = input[1].split(" ").map(x => Number(x)).filter(isEven);
    for (var i = 0; i < a.length; i++) {
        if (a[i] % 3 != 0 && a[i] % 5 != 0) {
            return console.log("DENIED");
        } 
    }
    console.log("APPROVED");

}
function isEven(num) {
    return num % 2 === 0;
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));