#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int la = 0, lb = 0;
  for (int i = 0; i < a.size(); i++) {
    la += (a[i] == '1');
  }
  for (int j = 0; j < b.size(); j++) {
    lb += (b[j] == '1');
  }
  cout << ((lb <= la + (la % 2 != 0)) ? "YES" : "NO") << endl;
  return 0;
}
