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