#include <bits/stdc++.h>
using namespace std;
int flag[1000006];
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b % 2 == 1) res = res * a;
    a = a * a;
    b /= 2;
  }
  return res;
}
bool cmp(pair<pair<string, int>, int>& a, pair<pair<string, int>, int>& b) {
  if (a.first.first != b.first.first) return a.first.first < b.first.first;
  return a.first.second > b.first.second;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int n, p;
  string s1, s2;
  cin >> s1 >> s2;
  int ansflag = 1, count1 = 0, count2 = 0;
  for (int i = 0; i < s1.size(); ++i) {
    if (s1[i] == '1') count1++;
  }
  if (count1 % 2 == 1) count1 = (count1 + 1);
  for (int i = 0; i < s2.size(); ++i) {
    if (s2[i] == '1') count2++;
  }
  if (count1 >= count2)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
