#include <bits/stdc++.h>
using namespace std;
const int mod = 2 * 1000010;
vector<int> v;
int main() {
  string a, b;
  cin >> a >> b;
  int uno = 0, dos = 0;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] == '1') uno++;
  for (int i = 0; i < b.size(); ++i)
    if (b[i] == '1') dos++;
  if (uno % 2) uno++;
  if (uno >= dos)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
