#include <bits/stdc++.h>
int main() {
  char str[1001] = {'\0'}, str2[1001] = {'\0'};
  gets(str);
  gets(str2);
  int i, a = 0, b = 0;
  for (i = 0; str[i] != '\0'; i++) {
    if (str[i] == '1') a++;
  }
  for (i = 0; str2[i] != '\0'; i++) {
    if (str2[i] == '1') b++;
  }
  a = a + (a & 1);
  if (b > a)
    printf("NO");
  else
    printf("YES");
  return 0;
}
