#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1000000000")
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  int cnt = 0;
  for (int i = 0; i < (int)a.size(); i++) {
    if (a[i] == '1') {
      cnt++;
    }
  }
  if (cnt % 2 == 1) {
    cnt++;
  }
  for (int i = 0; i < (int)b.size(); i++) {
    if (b[i] == '1') {
      cnt--;
    }
  }
  if (cnt >= 0) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
