let id x = x
let id' x = 1
let n = Scanf.scanf "%d\n" id

let g = (fun () -> Scanf.scanf "%d\n" id)
  
let repeat f =
  let rec loop acc = function
    | 0 -> List.rev acc
    | n -> loop (f () :: acc) (n - 1) in
  loop []
 
let r = repeat (fun () -> Scanf.scanf "%d " id) n
  
let rec check = function
  | [a] -> true
  | a :: rest ->
     match rest with
     | [b] -> if (a mod 2) = (b mod 2) then true else false
     | b :: rest2 ->
	match rest2 with
	| c :: rest3 -> if (a mod 2) = (b mod 2) then check ((a+b) :: rest2) else
	    if (a mod 2) = (c mod 2) then check ((a+c) :: b :: rest3) else check ((b+c) :: a :: rest2)

let ansbool = check r

let ans = if ansbool = true then "YES" else "NO"
    
let () = Printf.printf "%s\n" ans