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