#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < (((int)a.length())); i++)
    if (a[i] == '1') c1++;
  for (int i = 0; i < (((int)b.length())); i++)
    if (b[i] == '1') c2++;
  if (c1 & 1) {
    if (c2 <= c1 + 1)
      cout << "YES\n";
    else
      cout << "NO\n";
  } else {
    if (c2 <= c1)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
