#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 1e3 + 10;
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  int a = 0, b = 0;
  for (auto &c : s1) a += (c & 1);
  for (auto &c : s2) b += (c & 1);
  a += (a & 1);
  if (a >= b)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
