#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string a, b;
  cin >> a >> b;
  long long a1, b1;
  a1 = b1 = 0;
  for (int i = 0; i < a.size(); ++i) {
    if (a[i] == '1') a1++;
  }
  for (int i = 0; i < b.size(); ++i) {
    if (b[i] == '1') b1++;
  }
  if (a1 + (a1 & 1) >= b1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
