#include <bits/stdc++.h>
using namespace std;
int T, n, m, k;
struct Node {
  string s;
  int n;
};
char a[1002], b[1002];
int main() {
  while (~scanf("%s", a)) {
    scanf("%s", &b);
    int la = 0, lb = 0;
    for (int i = 0; a[i]; ++i)
      if (a[i] == '1') la++;
    if (la % 2) la++;
    for (int i = 0; b[i]; ++i)
      if (b[i] == '1') lb++;
    if (la >= lb)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
