Mr. Gora and his weird testfiles

0

0 votes
Very-Easy
Problem

Mr. Gora is preparing test files for lab assignments.

There are N lab assignments and for each lab assignment i he prepares a[i] test files.
If the number of lab assignments having even number of test files is same as number of lab assignments having odd number of test files, Mr. Gora laughs for no reason.
Given the value of N and number of test files for each lab assignment print "YES"(without quotes) if Mr. Gora laughs and "NO" (without quotes) if he doesn't.

Constraints:

1<=N<=105
1<=a[i]<=10

Input:
First line contains a single integer N.
Second line contains N space separated integers denoting the number of test files for each lab assignment.

Output:
Print the required answer.

Problem Setter - Teja Vojjala

Sample Input
4
1 2 3 4
Sample Output
YES
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?