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