#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000000000")
using namespace std;
int main() {
  string f, s;
  cin >> f >> s;
  long long int cf = 0, cs = 0;
  for (long long int i = 0; i < f.size(); i++) {
    if (f[i] == '1') cf++;
  }
  for (long long int i = 0; i < s.size(); i++) {
    if (s[i] == '1') cs++;
  }
  if (cs > cf + (cf & 1)) {
    cout << "NO";
  } else {
    cout << "YES";
  }
}
