#include <bits/stdc++.h>
using namespace std;
char a[100100];
char b[100100];
int na, nb;
int main() {
  cin >> a >> b;
  na = 0;
  nb = 0;
  for (int i = 0; a[i]; i++)
    if (a[i] == '1') na++;
  for (int i = 0; b[i]; i++)
    if (b[i] == '1') nb++;
  if (na % 2) na++;
  if (na >= nb) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
