#include <bits/stdc++.h>
using namespace std;
long long max(long long x, long long y) { return x > y ? x : y; }
long long min(long long x, long long y) { return x < y ? x : y; }
void _(long long& a, long long b) {
  a = (a % 1000000007 + b % 1000000007) % 1000000007;
  a = (a + 1000000007) % 1000000007;
}
long long cl(long long a, long long b) { return (a / b) + (!(!(a % b))); }
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s, t;
  cin >> s >> t;
  long long a, b;
  a = b = 0;
  for (long long i = 0; i < s.size(); ++i) {
    a += s[i] == '1';
  }
  for (long long i = 0; i < t.size(); ++i) {
    b += t[i] == '1';
  }
  if (a + (a & 1) >= b)
    cout << "YES";
  else
    cout << "NO";
}
