#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int x = count(a.begin(), a.end(), '1');
  cout << (x + x % 2 >= count(b.begin(), b.end(), '1') ? "YES" : "NO") << endl;
  return 0;
}
