#include <bits/stdc++.h>
using namespace std;
int n, m, c1, c2;
char s1[1005], s2[1005];
int main() {
  while (~scanf("%s %s", s1, s2)) {
    c1 = c2 = 0;
    n = strlen(s1);
    m = strlen(s2);
    for (int i = 0; i <= m - 1; i++)
      if (s2[i] == '1') c2++;
    for (int i = 0; i <= n - 1; i++)
      if (s1[i] == '1') c1++;
    if (c1 & 1) c1++;
    puts(c2 <= c1 ? "YES" : "NO");
  }
  return 0;
}
