let () = Scanf.scanf "%d\n" @@ fun n ->
  let list = List.init n (fun _ -> Scanf.scanf " %d" Fun.id) in
  Printf.printf "%s\n" @@
  if List.for_all (fun elm -> elm mod 2 = 1 || elm mod 3 = 0 || elm mod 5 = 0) list
  then "APPROVED"
  else "DENIED"