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