#include <bits/stdc++.h>
using namespace std;
int main() {
  string s1, s2;
  int n1 = 0, n2 = 0;
  cin >> s1 >> s2;
  for (int i = 0; i < (int)s1.size(); i++) {
    n1 += (s1[i] == '1');
  }
  for (int i = 0; i < (int)s2.size(); i++) {
    n2 += (s2[i] == '1');
  }
  if (n1 + (n1 & 1) >= n2) {
    puts("YES");
  } else {
    puts("NO");
  }
}
