#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  cin >> a >> b;
  int sum1 = 0, sum2 = 0;
  for (int i = 0; i < a.size(); i++)
    if (a[i] == '1') sum1++;
  for (int i = 0; i < b.size(); i++)
    if (b[i] == '1') sum2++;
  sum1 += sum1 % 2;
  if (sum1 >= sum2)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
