#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  while (cin >> a >> b) {
    int cnt1 = 0, cnt2 = 0;
    for (int i = 0; i < a.size(); ++i)
      if (a[i] == '1') ++cnt1;
    for (int i = 0; i < b.size(); ++i)
      if (b[i] == '1') ++cnt2;
    bool flag = 1;
    if (cnt1 & 1) ++cnt1;
    if (cnt1 < cnt2) flag = 0;
    if (flag)
      printf("YES\n");
    else
      printf("NO\n");
  }
  return 0;
}
