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