#include <bits/stdc++.h>
char a[1010], b[1010];
int main() {
  scanf("%s%s", a, b);
  int l = strlen(a);
  int m1 = 0, m2 = 0;
  for (int i = 0; i < l; i++)
    if (a[i] == '1') m1++;
  if (m1 % 2 == 1) m1++;
  l = strlen(b);
  for (int i = 0; i < l; i++)
    if (b[i] == '1') m2++;
  if (m1 >= m2)
    puts("YES");
  else
    puts("NO");
  return 0;
}
