#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double PI = acos(-1.0);
const long long int mod = 1e9 + 7;
const int MAXN = 1e6 + 5;
void cp() {
  string a, b;
  cin >> a >> b;
  int a1 = 0, b1 = 0;
  for (char x : a) a1 += x - '0';
  for (char x : b) b1 += x - '0';
  bool ok = false;
  if (a1 & 1) {
    if (b1 >= 0 && b1 <= a1 + 1) ok = true;
  } else {
    if (b1 >= 0 && b1 <= a1) ok = true;
  }
  cout << (ok ? "YES" : "NO");
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  t = 1;
  while (t--) {
    cp();
  }
  return 0;
}
