#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(); i++)
    if (a[i] - '0') x++;
  for (int i = 0; i < b.size(); i++)
    if (b[i] - '0') y++;
  if (x % 2 == 1) x++;
  if (x < y)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
