let () =
    let _ = stdin.ReadLine()
    let aarr = stdin.ReadLine().Split()
               |> Array.map int
    aarr
    |> Array.groupBy (fun a -> a % 2)
    |> Array.choose (fun (k, arr) -> if k = 1 then Some(Array.length arr) else None)
    |> (fun arr -> (Array.isEmpty arr) || arr.[0] % 2 = 0)
    |> function | true -> "YES" | false -> "NO"
    |> printfn "%s"