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