#include <bits/stdc++.h>
using namespace std;
char str1[100005], str2[100005];
int main() {
  int i, cnt1 = 0, cnt2 = 0;
  scanf("%s%s", str1, str2);
  for (i = 0; str1[i]; i++) cnt1 += str1[i] & 1;
  for (i = 0; str2[i]; i++) cnt2 += str2[i] & 1;
  if (cnt1 & 1) cnt1++;
  printf("%s\n", cnt1 >= cnt2 ? "YES" : "NO");
  return 0;
}
