#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100010], t = 0, o = 0;
  string s = "NO";
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] % 2 == 0)
      t++;
    else
      o++;
  }
  if (t == o || o - t == 1 || t - o == 1) s = "YES";
  cout << s;
  return 0;
}
