#include <bits/stdc++.h>
using namespace std;
const long long oo = 1e18 + 5;
void solve() {
  string s, t;
  cin >> s >> t;
  int n = s.size(), m = t.size(), cnt_s = 0, cnt_t = 0;
  for (int i = 0; i < n; ++i) {
    cnt_s += s[i] == '1';
  }
  for (int i = 0; i < m; ++i) {
    cnt_t += t[i] == '1';
  }
  cnt_s += cnt_s & 1;
  cout << (cnt_s >= cnt_t ? "YES\n" : "NO\n");
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T--) {
    solve();
  }
}
