let id x = x
let n = 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 :: b :: [] -> if (a mod 2) = (b mod 2) then true else false
  | a :: b :: c :: rest ->
     if (a mod 2) = (b mod 2) then check ((a+b) :: c :: rest) else
       if (a mod 2) = (c mod 2) then check ((a+c) :: b :: rest) else
	 check ((b+c) :: a :: rest)

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