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