#include <bits/stdc++.h>
using namespace std;
char s[1010], t[1010];
int lens, lent, cnts, cntt;
int main() {
  scanf("%s%s", s, t);
  lens = strlen(s);
  lent = strlen(t);
  cnts = cntt = 0;
  for (int i = 0; i < lens; i++)
    if (s[i] == '1') cnts++;
  for (int i = 0; i < lent; i++)
    if (t[i] == '1') cntt++;
  if (cnts & 1) cnts++;
  if (cnts >= cntt)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
