import Foundation

let N = Int(readLine()!)!
let entryNumber = readLine()!.components(separatedBy: " ").map{ Int($0)! }

var evenNumbers:[Int] = []
var j = 0

for i in 0...N - 1 {
    if entryNumber[i] % 2 == 0 {
        evenNumbers.append(entryNumber[i])
        if evenNumbers[j] % 3 != 0 && evenNumbers[j] % 5 != 0 {
            print("DENIED")
            break
        }
        j += 1
    }
    if i == N - 1 {
        print("APPROVED")
    }
}