#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T abs(T a) {
  return a < 0 ? (-a) : a;
}
template <typename T>
inline T sqr(T x) {
  return x * x;
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int c1 = 0;
  int c2 = 0;
  for (int i = 0; i < (s1.size()); ++i) {
    c1 += s1[i] == '1';
  }
  for (int i = 0; i < (s2.size()); ++i) {
    c2 += s2[i] == '1';
  }
  if (c1 % 2) ++c1;
  if (c1 >= c2) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
