#include <bits/stdc++.h>
using namespace std;
int ON(int N, int pos) { return N = N | (1 << pos); }
int OFF(int N, int pos) { return N = N & ~(1 << pos); }
bool isON(int N, int pos) { return (bool)(N & (1 << pos)); }
string A, B;
int main() {
  int tc, cs;
  int i, j, k;
  cin >> A >> B;
  int x = 0, y = 0;
  for (i = 0; i < A.size(); i++) {
    if (A[i] == '1') x++;
  }
  for (i = 0; i < B.size(); i++) {
    if (B[i] == '1') {
      y++;
    }
  }
  int p = x % 2;
  if (x + p >= y) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
