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