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