#include <bits/stdc++.h>
using namespace std;
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  int cnt1 = 0, cnt2 = 0;
  for (int i = 0; i < str1.length(); i++) cnt1 += (str1[i] == '1');
  for (int i = 0; i < str2.length(); i++) cnt2 += (str2[i] == '1');
  if (cnt1 + (cnt1 & 1) >= cnt2)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
