#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
int to_i(string s) {
  stringstream ss;
  int ret;
  ss << s;
  ss >> ret;
  return ret;
}
string to_s(int i) {
  stringstream ss;
  ss << i;
  return ss.str();
}
int main() {
  string a, b;
  cin >> a >> b;
  int A = 0, B = 0;
  for (int i = 0; i < a.size(); i++)
    if (a[i] == '1') A++;
  for (int i = 0; i < b.size(); i++)
    if (b[i] == '1') B++;
  if (A + (A % 2) >= B)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
