#agc010a. [agc010_a]Addition
[agc010_a]Addition
Problem Statement
There are integers written on a blackboard. The -th integer is .
Takahashi will repeatedly perform the following operation on these numbers:
- Select a pair of integers, and , that have the same parity (that is, both are even or both are odd) and erase them.
- Then, write a new integer on the blackboard that is equal to the sum of those integers, .
Determine whether it is possible to have only one integer on the blackboard.
Constraints
- is an integer.
Input
The input is given from Standard Input in the following format:
…
Output
If it is possible to have only one integer on the blackboard, print YES
. Otherwise, print NO
.
Sample Input 1
3
1 2 3
Sample Output 1
YES
It is possible to have only one integer on the blackboard, as follows:
- Erase and from the blackboard, then write . Now, there are two integers on the blackboard: and .
- Erase and from the blackboard, then write . Now, there is only one integer on the blackboard: .
Sample Input 2
5
1 2 3 4 5
Sample Output 2
NO