#include <bits/stdc++.h>
using namespace std;
string a, b;
int as, bs;
int main() {
  cin >> a >> b;
  for (int i = 0; i < a.size(); i++) as += a[i] == '1';
  for (int i = 0; i < b.size(); i++) bs += b[i] == '1';
  if (as + (as & 1) >= bs) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
}
