You are fishing with polar bears Alice and Bob. While waiting for the fish to bite, the polar bears get bored. They come up with a game. First Alice and Bob each writes a 01-string (strings that only contain character "0" and "1") a and b. Then you try to turn a into b using two types of operations:  Write parity(a) to the end of a. For example, $1010 \rightarrow 10100$.  Remove the first character of a. For example, $1001 \rightarrow 001$. You cannot perform this operation if a is empty. 

You can use as many operations as you want. The problem is, is it possible to turn a into b?

The parity of a 01-string is 1 if there is an odd number of "1"s in the string, and 0 otherwise.


-----Input-----

The first line contains the string a and the second line contains the string b (1 ≤ |a|, |b| ≤ 1000). Both strings contain only the characters "0" and "1". Here |x| denotes the length of the string x.


-----Output-----

Print "YES" (without quotes) if it is possible to turn a into b, and "NO" (without quotes) otherwise.


-----Examples-----
Input
01011
0110

Output
YES

Input
0011
1110

Output
NO



-----Note-----

In the first sample, the steps are as follows: 01011 → 1011 → 011 → 0110

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Constructive algorithms


Solutions:
a = list(input())
b = list(input())
print(['NO', 'YES'][a.count('1') + a.count('1') % 2 >= b.count('1')])


n = input().count('1')
m = input().count('1')
print('YNEOS'[n + (n & 1) < m::2])


def maxConsecutive(a):
	i = 1
	curr = 0
	if a[0] == '1':
		curr += 1
	ans = curr
	for i in range(len(a)):
		if a[i] == '1':
			curr += 1
		else:
			curr = 1
		ans = max(ans, curr)
	return ans

def countOne(a):
	ans = 0
	for i in range(len(a)):
		if a[i] == '1':
			ans += 1
	return ans
a = input()
b = input()
if countOne(a) + countOne(a) % 2 >= countOne(b):
	print('YES')
else:
	print('NO')


s = input()
t = input()
a = s.count('1')
b = t.count('1')
if a % 2 == 0:
	if b <= a:
		print('YES')
	else:
		print('NO')
elif b <= a + 1:
	print('YES')
else:
	print('NO')


(a, b) = (input(), input())
ca = a.count('1')
cb = b.count('1')
if ca + ca % 2 >= cb:
	print('YES')
else:
	print('NO')


alice = input()
bob = input()
a = alice.count('1')
b = bob.count('1')
a += a % 2
print('YES' if a >= b else 'NO')


print('YES' if input().count('1') + 1 >> 1 << 1 >= input().count('1') else 'NO')


a = input().rstrip()
b = input().rstrip()
cnta = 0
cntb = 0
for i in a:
	if i == '1':
		cnta += 1
for i in b:
	if i == '1':
		cntb += 1
if cntb - cnta > 1 or (cntb - cnta == 1 and cnta % 2 == 0):
	print('NO')
	exit()
else:
	print('YES')


A = list(input())
B = list(input())
zA = A.count('1')
zA += zA & 1
if zA >= B.count('1'):
	print('YES')
else:
	print('NO')


a = []
b = []
a = input()
b = input()
cnta = 0
cntb = 0
for (i, val) in enumerate(a):
	if val == '1':
		cnta = cnta + 1
for (i, val) in enumerate(b):
	if val == '1':
		cntb = cntb + 1
if cnta & 1 == 1:
	cnta = cnta + 1
if cnta >= cntb:
	print('YES')
else:
	print('NO')


a = input()
b = input()
sa = 0
for s in a:
	if s == '1':
		sa += 1
sb = 0
for s in b:
	if s == '1':
		sb += 1
if sa >= sb:
	print('YES')
elif sb % 2 == 0:
	if sa == sb - 1:
		print('YES')
	else:
		print('NO')
else:
	print('NO')


def main():
	(a, b) = (input().count('1') for _ in 'ab')
	print(('NO', 'YES')[a + (a & 1) >= b])

def __starting_point():
	main()
__starting_point()


a = input()
b = input()
cnt1 = a.count('1') + (a.count('1') % 2 == 1)
cnt2 = b.count('1')
print('YES' if cnt1 >= cnt2 else 'NO')


a = input()
b = input()
coa = 0
cob = 0
for i in a:
	if i == '1':
		coa += 1
for i in b:
	if i == '1':
		cob += 1
if coa + (coa & 1) >= cob:
	print('YES')
else:
	print('NO')


(ax, bx) = (0, 0)
for c in input():
	if c == '1':
		ax += 1
for c in input():
	if c == '1':
		bx += 1
print('YES' if bx <= ax + ax % 2 else 'NO')


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
a = ri()
b = ri()
(cnt1, cnt2) = (0, 0)
cnt1 = a.count('1')
cnt2 = b.count('1')
if cnt1 % 2 == 1:
	cnt1 += 1
if cnt1 < cnt2:
	NO()
else:
	YES()


a = (input().count('1') + 1) // 2
b = (input().count('1') + 1) // 2
print('YES' if a >= b else 'NO')


def play(s, t):
	(count1, count2) = (0, 0)
	for elem in s:
		if elem == '1':
			count1 += 1
	for elem in t:
		if elem == '1':
			count2 += 1
	if count2 - count1 > 1 or (count2 - count1 == 1 and count1 % 2 == 0):
		return 'NO'
	return 'YES'
a = input()
b = input()
print(play(a, b))


def yesOrNo(a, b):
	x = a.count('1')
	y = b.count('1')
	if x % 2 == 1:
		x += 1
	if x < y:
		return 'NO'
	else:
		return 'YES'
a = input()
b = input()
print(yesOrNo(a, b))


(a, b) = (input(), input())
ax = sum([ord(c) - ord('0') for c in a])
bx = sum([ord(c) - ord('0') for c in b])
print('YES' if bx <= ax + ax % 2 else 'NO')


(a, b) = (input(), input())
(x, y) = (a.count('1'), b.count('1'))
print('YNEOS'[x + (x & 1) < y::2])


a = input()
b = input()
acount = a.count('1')
bcount = b.count('1')
if acount % 2 == 1:
	acount += 1
if acount >= bcount:
	print('YES')
else:
	print('NO')


import os, sys
from io import BytesIO, IOBase

def main():
	(a, b) = (input().strip(), input().strip())
	(x, y) = (a.count('1'), b.count('1'))
	if y > x + (x & 1):
		print('NO')
	else:
		print('YES')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()