#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  int a = 0, b = 0;
  cin >> s;
  for (char c : s) a += (c == '1');
  cin >> s;
  for (char c : s) b += (c == '1');
  if (a % 2 == 1) a++;
  if (a >= b)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
