#include <bits/stdc++.h>
using namespace std;
string a, b;
int unia, unib;
int main() {
  ios::sync_with_stdio(false);
  cin >> a >> b;
  for (int i = 0; i < (int)a.size(); i++)
    if (a[i] == '1') unia++;
  for (int i = 0; i < (int)b.size(); i++)
    if (b[i] == '1') unib++;
  if ((unia % 2 == 1 && unib > unia + 1) || (unia % 2 == 0 && unib > unia))
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
