Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    print_endline @@ if Array.fold_left (fun acc v -> acc + v mod 2) 0 a mod 2 = 0 then "YES" else "NO"
)