#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  cin >> a >> b;
  int num_a = 0, num_b = 0;
  for (int i = 0; i < a.size(); ++i) num_a += (a[i] - '0');
  for (int i = 0; i < b.size(); ++i) num_b += (b[i] - '0');
  if (num_a & 1) ++num_a;
  if (num_a >= num_b)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
}
