#include <bits/stdc++.h>
using namespace std;
const double eps = 1E-8;
char s1[1001], s2[1001];
bool solve() {
  if (scanf("%s%s", s1, s2) == EOF) return false;
  int ones1 = 0, ones2 = 0;
  for (int i = 0; s1[i]; ++i) ones1 += s1[i] == '1';
  for (int i = 0; s2[i]; ++i) ones2 += s2[i] == '1';
  if (ones1 % 2) ones1++;
  printf("%s\n", ones1 >= ones2 ? "YES" : "NO");
  return true;
}
int main() { solve(); }
