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