#include <bits/stdc++.h>
using namespace std;
int main() {
  char st[1020], ed[1020];
  int cnt1 = 0, cnt2 = 0, o = 0;
  scanf("%s", &st);
  scanf("%s", &ed);
  for (int i = 0; i < strlen(st); i++)
    if (st[i] == '1') cnt1++;
  for (int i = 0; i < strlen(ed); i++)
    if (ed[i] == '1') cnt2++;
  if (cnt1 & 1) cnt1++;
  if (cnt1 < cnt2) o = 1;
  if (o)
    printf("NO\n");
  else
    printf("YES\n");
}
