#include <bits/stdc++.h>
using namespace std;
const int infint = INT_MAX;
const long long infll = LLONG_MAX;
int main() {
  string a, b;
  cin >> a >> b;
  int cnta = 0, cntb = 0;
  for (int i = 0; i < a.length(); i++)
    if (a[i] == '1') cnta++;
  for (int i = 0; i < b.length(); i++)
    if (b[i] == '1') cntb++;
  if (cnta % 2 == 1) cnta++;
  if (cnta >= cntb) {
    cout << "YES";
  } else
    cout << "NO";
  return 0;
}
