#include <bits/stdc++.h>
using namespace std;
string s;
string s1;
long long n, m, k, i, j;
int main() {
  cin >> s;
  cin >> s1;
  for (i = 0; i < s.size(); i++) {
    if (s[i] == '1') {
      n++;
    }
  }
  if (n % 2 == 1) {
    n++;
  }
  for (i = 0; i < s1.size(); i++) {
    if (s1[i] == '1') {
      m++;
    }
  }
  if (n >= m) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
