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