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