#include <bits/stdc++.h>
using namespace std;
char P[1001], T[1001];
int cntOnes(char *X, int n) {
  int ones = 0;
  for (int i = 0; i < n; i++) ones += (X[i] - '0');
  return ones;
}
int main() {
  scanf("%s\n%s", P, T);
  int na, nb;
  na = strlen(P);
  nb = strlen(T);
  int oa = cntOnes(P, na);
  int ob = cntOnes(T, nb);
  oa += (oa & 1);
  if (oa < ob)
    printf("NO");
  else
    printf("YES");
  return 0;
}
