#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, c1 = 0, c2 = 0, c3 = 0, y = 0, x = 0, i;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 0)
      c1++;
    else if ((a[i] % 2 == 0) && (a[i] != 0))
      c2++;
    else if ((a[i] % 2 != 0) && (a[i] != 0))
      c3++;
  }
  if (c1 == 0) {
    if (c3 % 2 == 0)
      printf("YES");
    else
      printf("NO");
  } else {
    for (i = 0; i < n; i++) {
      if (a[i] % 2 != 0)
        x++;
      else if (a[i] == 0) {
        if (x % 2 != 0) {
          y = 1;
          break;
        }
      }
    }
    if ((y != 1) && (c3 % 2 == 0))
      printf("YES");
    else
      printf("NO");
  }
}
