#include <bits/stdc++.h>
using namespace std;
double pi = 3.1415926536;
int dx[] = {0, 1, 0, -1};
int dy[] = {1, 0, -1, 0};
const int oo = (int)1e9;
int main() {
  ios_base::sync_with_stdio(false);
  string s1, s2;
  cin >> s1 >> s2;
  int sum1, sum2;
  sum1 = count(s1.begin(), s1.end(), '1');
  sum2 = count(s2.begin(), s2.end(), '1');
  if ((sum1 % 2)) sum1++;
  if (sum1 >= sum2)
    cout << "YES";
  else
    cout << "NO";
}
