#include <bits/stdc++.h>
using namespace std;
const int MAXN = (long long)1e2;
const int INF = (long long)1e9;
const int MOD = (long long)1e9 + 7;
const int CHR = 97;
int cnt[2];
string str[2];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 0; i < 2; i++)
    cin >> str[i], cnt[i] = count(str[i].begin(), str[i].end(), '1');
  cout << ((cnt[1] <= cnt[0] + cnt[0] % 2) ? "YES\n" : "NO\n");
}
