#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < s1.length(); i++)
    if (s1[i] == '1') c1++;
  for (int i = 0; i < s2.length(); i++)
    if (s2[i] == '1') c2++;
  if (c1 & 1) c1++;
  if (c1 >= c2)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
