#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long arr[n + 1];
  vector<int> odd;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] % 2) {
      odd.push_back(i);
    }
  }
  int l = odd.size();
  if (l and (odd[0] != 0 or odd[l - 1] != n - 1)) {
    cout << "NO";
    return 0;
  } else if (l >= 2) {
    if (n % 2)
      cout << "YES";
    else
      cout << "NO";
  } else if (n == 1 and l == 1) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
