#include <bits/stdc++.h>
using namespace std;
string a, b;
int ans[2];
void dfs(string s, int pos) {
  cout << s << " " << pos << endl;
  if (s == "0") {
    ans[pos] |= 1;
    return;
  }
  if (s == "1") {
    ans[pos] |= 2;
    return;
  }
  dfs(s.substr(1), pos);
  int ct = count(s.begin(), s.end(), '1');
  if (ct % 2 == 0) dfs(s.substr(0, s.length() - 1), pos);
}
int main() {
  cin >> a >> b;
  int ac = count(a.begin(), a.end(), '1');
  int bc = count(b.begin(), b.end(), '1');
  if (ac % 2) {
    ac++;
  }
  if (ac >= bc)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
