#include <bits/stdc++.h>
char s1[1010], s2[1010];
int main() {
  int i, j, n1, n2, a = 0, b = 0;
  gets(s1);
  gets(s2);
  n1 = strlen(s1);
  n2 = strlen(s2);
  for (i = 0; i < n1; ++i)
    if (s1[i] == '1') ++a;
  for (i = 0; i < n2; ++i)
    if (s2[i] == '1') ++b;
  if (a % 2) ++a;
  if (a >= b)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
