#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int o1, o2;
  o1 = o2 = 0;
  ios_base::sync_with_stdio(0);
  cin >> a;
  cin >> b;
  for (int i = 0; i < a.size(); i++) {
    if (a[i] == '1') o1++;
  }
  for (int i = 0; i < b.size(); i++) {
    if (b[i] == '1') o2++;
  }
  if (o1 % 2 == 1) o1++;
  if (o2 <= o1)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
