#include <bits/stdc++.h>
using namespace std;
const int OO = 2e9;
const int MOD = 1e9 + 7;
const double Pi = 3.141592653589793;
const int N = 1e5 + 5;
int c1 = 0, c2 = 0;
char a[N], b[N];
int main() {
  cin >> (a + 1);
  cin >> (b + 1);
  for (int i = (int)1; i <= (int)strlen(a + 1); i++) c1 += (a[i] == '1');
  for (int i = (int)1; i <= (int)strlen(b + 1); i++) c2 += (b[i] == '1');
  if (c1 + c1 % 2 >= c2)
    cout << "YES";
  else
    cout << "NO";
}
