import Foundation
 
let N = Int(readLine()!)!
let array = readLine()!.componentsSeparatedByString(" ").map { Int($0)! }
var answer = "APPROVED"
for i in 0..<N {
  if array[i] % 2 == 0 {
    if array[i] % 3 != 0 && array[i] % 5 != 0 {
      answer = "DENIED"
      break
    }
  }
}
print(answer)