#include <bits/stdc++.h>
using namespace std;
long long k, l, k1;
string s1, s2;
int main() {
  cin >> s1 >> s2;
  for (int i = 0; i < s1.size(); ++i) {
    if (s1[i] == '1') {
      ++k;
    }
  }
  for (int i = 0; i < s2.size(); ++i) {
    if (s2[i] == '1') {
      ++k1;
    }
  }
  if (k >= k1 - (k % 2 != 0)) {
    cout << "YES";
    return 0;
  }
  cout << "NO";
  return 0;
}
