#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  int cnt1 = 0;
  for (int i = 0; i < (int)a.length(); i++) cnt1 += a[i] - '0';
  int cnt2 = 0;
  for (int i = 0; i < (int)b.length(); i++) cnt2 += b[i] - '0';
  if (cnt1 + (cnt1 & 1) >= cnt2)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
