#include <bits/stdc++.h>
char s[1005];
int n, t1, t2;
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) t1 += s[i] - '0';
  if (t1 & 1) t1++;
  scanf("%s", s + 1);
  n = strlen(s + 1);
  for (int i = 1; i <= n; i++) t2 += s[i] - '0';
  if (t1 >= t2)
    printf("YES\n");
  else
    printf("NO\n");
}
