#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
string s, s2;
int main() {
  cin >> s >> s2;
  int cnt = count(s.begin(), s.end(), '1');
  cnt += (cnt & 1);
  puts(count(s2.begin(), s2.end(), '1') <= cnt ? "YES" : "NO");
  return 0;
}
