#include <bits/stdc++.h>
char a[2000], b[2000];
int main() {
  int suma = 0, sumb = 0, lena, lenb, i;
  while (scanf("%s", a) != EOF) {
    scanf("%s", b);
    lena = strlen(a);
    lenb = strlen(b);
    suma = 0;
    sumb = 0;
    for (i = 0; i < lena; i++)
      if (a[i] == '1') suma++;
    for (i = 0; i < lenb; i++)
      if (b[i] == '1') sumb++;
    if (suma % 2 == 1) suma++;
    if (suma >= sumb)
      printf("YES\n");
    else
      printf("NO\n");
  }
}
