#include <bits/stdc++.h>
using namespace std;
char a[1111], b[1111];
int calc1(const char* s) {
  int ans = 0;
  for (; *s; ++s)
    if (*s == '1') ans++;
  return ans;
}
int main() {
  cin.getline(a, 1100);
  cin.getline(b, 1100);
  int na = calc1(a);
  int nb = calc1(b);
  if (na & 1) ++na;
  if (nb & 1) ++nb;
  if (na >= nb)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
