#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  int f;
  for (f = 0; f < a.length(); f++) {
    if (a[f] == '1') {
      break;
    }
  }
  f = a.size() - f;
  int s;
  for (s = 0; s < b.length(); s++) {
    if (b[s] == '1') {
      break;
    }
  }
  s = b.size() - s;
  if (f + (f % 2) >= s)
    cout << "YES";
  else
    cout << "NO" << endl;
  return 0;
}
