#include <bits/stdc++.h>
using namespace std;
string FILE_NAME = "testcase.C";
string NAME;
string itos(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
int parity(string s) {
  int n = s.length();
  int cnt = 0;
  for (int i = 0; i < (n); i++) {
    if (s[i] == '1') cnt++;
  }
  return (cnt % 2 == 0 ? 0 : 1);
}
int main() {
  string a = "", b = "";
  cin >> a >> b;
  bool ok = false;
  if ((int)count(a.begin(), a.end(), '1') + parity(a) >=
      (int)count(b.begin(), b.end(), '1'))
    ok = true;
  if (ok) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
