#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
long long i, j, k, n, m, M, s, len, ans, co, T, f, r, t, pos, pre;
string a, b, c;
long long lena, lenb, ff;
int main() {
  cin >> a >> b;
  for (i = 0; i <= a.size() - 1; i++)
    if (a[i] == '1') co++;
  if (co % 2 == 1) co++;
  for (i = 0; i <= b.size() - 1; i++)
    if (b[i] == '1') co--;
  if (co >= 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
