#include <bits/stdc++.h>
using namespace std;
char a[1010];
char b[1010];
int main() {
  while (~scanf("%s %s", a, b)) {
    int pa = 0, pb = 0;
    for (int i = 0; i < strlen(a); i++) {
      if (a[i] == '1') pa++;
    }
    for (int i = 0; i < strlen(b); i++) {
      if (b[i] == '1') pb++;
    }
    if (pa % 2 == 1) pa++;
    if (pa >= pb)
      printf("YES\n");
    else {
      printf("NO\n");
    }
  }
  return 0;
}
