#include <bits/stdc++.h>
char A[1005], B[1005];
int main() {
  scanf("%s", A);
  scanf("%s", B);
  int A1 = 0, B1 = 0;
  for (int i = 0; A[i]; i++)
    if (A[i] == '1') A1++;
  for (int i = 0; B[i]; i++)
    if (B[i] == '1') B1++;
  if (A1 % 2 == 1) A1++;
  if (B1 <= A1)
    puts("YES");
  else
    puts("NO");
  return 0;
}
