#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  cin >> a >> b;
  if (count(a.begin(), a.end(), '1') + (count(a.begin(), a.end(), '1') % 2) >=
      count(b.begin(), b.end(), '1'))
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
