#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  getline(cin, a);
  getline(cin, b);
  int c1 = 0, c2 = 0;
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == '1') c1++;
  }
  for (int i = 0; i < b.length(); i++) {
    if (b[i] == '1') c2++;
  }
  if ((c1 & 1) && ((c1 + 1) >= c2) || ((c1 & 1) == 0) && c1 >= c2)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
