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