let () =
	let n = Scanf.scanf "%d\n" (fun x -> x) in
    let lst = Array.to_list (Array.init n (fun _ -> Scanf.scanf "%d " (fun x -> x))) in
    Printf.printf 
    	(if (List.for_all (fun x -> (x mod 2 = 1) || ((x mod 2 = 0) && (x mod 3 = 0 || x mod 5 = 0))) lst) 
         then "APPROVED" else "DENIED")