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