open Printf
open Scanf

module L =
  struct
    include List
  
    let init n f =
      let rec loop i =
        if i = n then []
        else let x = f i in
             x :: loop (i + 1) in
      loop 0
  end
       
let solve n =
  let f x = x mod 2 = 1 || x mod 3 = 0 || x mod 5 = 0 in
  if L.for_all f @@ L.init n @@ fun _ -> scanf "%d " @@ fun x -> x then "APPROVED" else "DENIED"

let () =
  scanf "%d " solve |> printf "%s\n"
