#include <bits/stdc++.h>
using namespace std;
string a, b;
int sum1 = 0, sum2 = 0;
int main() {
  cin >> a >> b;
  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 >= sum2) ? cout << "YES\n" : cout << "NO\n";
}
