#include <bits/stdc++.h>
using namespace std;
int f(string s) {
  int ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '1') {
      ans++;
    }
  }
  return ans;
}
int main() {
  string a, b;
  cin >> a >> b;
  int c1 = f(a);
  if (c1 % 2 != 0) {
    c1++;
  }
  if (c1 >= f(b)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
