#include <bits/stdc++.h>
char a[1010], b[1010];
int main() {
  int i, j, p, q, la, lb;
  scanf("%s%s", a, b);
  la = strlen(a);
  lb = strlen(b);
  for (i = p = 0; i < la; i++)
    if (a[i] == '1') p++;
  if (p & 1) p++;
  for (i = q = 0; i < lb; i++)
    if (b[i] == '1') q++;
  if (p >= q)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
