#include <bits/stdc++.h>
using namespace std;
int main() {
  int cnt1 = 0, cnt2 = 0;
  char c;
  while ((c = getchar()) != '\n') {
    if (c == '1') cnt1++;
  }
  if (cnt1 % 2) cnt1++;
  while ((c = getchar()) != '\n') {
    if (c == '1') cnt2++;
  }
  if (cnt2 <= cnt1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
