function Main(input) {
    var N = parseInt(input[0], 10);
    var A = input.slice(1).map(a => parseInt(a, 10));

    for (var i = 0; i < N; i++) {
        if (A[i] % 2 === 0 && !(A[i] % 3 === 0 || A[i] % 5 === 0)) {
            return console.log('DENIED');
        }
    }

    return console.log('APPROVED');
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));