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