#include <bits/stdc++.h>
using namespace std;
string a, b, s;
long long int i, j, k, count2;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> a;
  cin >> b;
  size_t count1 = count(a.begin(), a.end(), '1');
  for (i = 0; i < b.size(); i++)
    if (b[i] == '1') count2++;
  if (count1 % 2) count1++;
  k = count1 - count2;
  if (k < 0)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  cin.get();
  cin.get();
  return 0;
}
