#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, o1 = 0, o2 = 0;
  string s1;
  cin >> s1;
  for (i = 0; i < s1.size(); i++) o1 += (s1[i] == '1');
  string s2;
  cin >> s2;
  for (i = 0; i < s2.size(); i++) o2 += (s2[i] == '1');
  o1 += o1 % 2;
  if (o1 >= o2)
    cout << "YES";
  else
    cout << "NO";
}
