#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  while (cin >> a >> b) {
    int x = 0, y = 0;
    for (int i = 0; i < a.size(); i++) x += a[i] == '1';
    for (int i = 0; i < b.size(); i++) y += b[i] == '1';
    if (x & 1) x++;
    puts(x >= y ? "YES" : "NO");
  }
  return 0;
}
