let () = Scanf.scanf "%d\n" @@ fun n ->
  let as_ = Array.init n @@ fun _ -> Scanf.scanf "%d " @@ fun a -> a in
  print_endline @@
  if List.for_all (fun a -> a mod 2 = 1 || a mod 3 = 0 || a mod 5 = 0) @@ Array.to_list as_
  then "APPROVED" else "DENIED"