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