#include <bits/stdc++.h>
using namespace std;
void bug() { cout << " " << endl; }
template <class T>
void bug(T a) {
  cout << a << "  ";
}
template <class T>
void bug(T* a, int n) {
  for (int i = 0; i < (n); i++) bug(a[i]);
}
char sa[111111], sb[111111];
int n, m;
int main() {
  cin >> sa >> sb;
  n = strlen(sa);
  m = strlen(sb);
  int x = 0, y = 0;
  for (int i = 0; i < (n); i++) x += sa[i] == '1';
  for (int i = 0; i < (m); i++) y += sb[i] == '1';
  if (x % 2 == 1) x++;
  if (x >= y)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
