#include <bits/stdc++.h>
using namespace std;
char a[1100], b[1100];
int cnt1, cnt2;
int L1, L2;
int main() {
  cin >> a >> b;
  cnt1 = cnt2 = 0;
  L1 = strlen(a);
  L2 = strlen(b);
  for (int i = 0; i < L1; i++)
    if (a[i] == '1') cnt1++;
  for (int i = 0; i < L2; i++)
    if (b[i] == '1') cnt2++;
  if (cnt1 % 2 == 1) cnt1++;
  if (cnt1 >= cnt2)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
