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