#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  cin >> a >> b;
  int n1 = count(a.begin(), a.end(), '1');
  int n2 = count(b.begin(), b.end(), '1');
  if (n1 & 1) {
    n1++;
  }
  if (n1 >= n2) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
