#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int c = 0, d = 0, i;
  cin >> a >> b;
  for (i = 0; i < a.size(); i++)
    if (a[i] == '1') c++;
  for (i = 0; i < b.size(); i++)
    if (b[i] == '1') d++;
  if (c % 2 != 0) c++;
  if (d % 2 != 0) d++;
  if (c >= d)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
