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