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