#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s, ss;
  cin >> s >> ss;
  long long int one_first = 0, one_second = 0;
  for (auto it : s)
    if (it == '1') one_first++;
  for (auto it : ss)
    if (it == '1') one_second++;
  one_first += (one_first % 2);
  if (one_first >= one_second)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
