#include <bits/stdc++.h>
using namespace std;
int numOnes(string a) {
  int num = 0;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '1') num++;
  }
  return num;
}
int parity(string a) {
  if (numOnes(a) % 2 == 1) return 1;
  return 0;
}
int main(int argc, char *argv[]) {
  string begin, target;
  cin >> begin >> target;
  bool possible = (numOnes(begin) + parity(begin)) >= numOnes(target);
  if (possible)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
