inp = require('fs').readFileSync('/dev/stdin', 'utf8').trim().split('\n')
N = inp.shift() * 1
A = inp.shift().split(" ").map(x => x - 0)
b = true
for (i=0; i<N; i++) {
    if (A[i] % 2 === 0) {
        if (A[i] % 3 === 0 || A[i] % 5 === 0) {
            
        } else {
            b = false
        }
    }
}
console.log(b ? "APPROVED" : "DENIED")
