Two people are playing a game with a string $s$, consisting of lowercase latin letters. 

On a player's turn, he should choose two consecutive equal letters in the string and delete them. 

For example, if the string is equal to "xaax" than there is only one possible turn: delete "aa", so the string will become "xx". A player not able to make a turn loses.

Your task is to determine which player will win if both play optimally.


-----Input-----

The only line contains the string $s$, consisting of lowercase latin letters ($1 \leq |s| \leq 100\,000$), where $|s|$ means the length of a string $s$.


-----Output-----

If the first player wins, print "Yes". If the second player wins, print "No".


-----Examples-----
Input
abacaba

Output
No

Input
iiq

Output
Yes

Input
abba

Output
No



-----Note-----

In the first example the first player is unable to make a turn, so he loses.

In the second example first player turns the string into "q", then second player is unable to move, so he loses.

Source: codeforces | Difficulty: EASY
Tags: Mathematics

Data structures

Implementation


Solutions:
b = []
p = 0
for s in input():
	if len(b) == 0:
		b = [s]
	elif b[-1] == s:
		p = 1 - p
		del b[-1]
	else:
		b.append(s)
if p == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = []
c = 0
for i in range(0, len(s)):
	if len(stack) == 0:
		stack.append(s[i])
	elif s[i] == stack[-1]:
		stack.pop()
		c += 1
	else:
		stack.append(s[i])
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
n = 0
l = [0]
for i in s:
	if l[-1] == i:
		n += 1
		l.pop()
	else:
		l.append(i)
if n % 2 == 0:
	print('No')
else:
	print('Yes')


s = list(input())
(i, j) = (0, 1)
ans = 0
d = [-1 for i in range(len(s))]
pos = -1
while j < len(s):
	if s[i] == s[j]:
		if pos > -1:
			i = d[pos]
			pos -= 1
		else:
			i = j + 1
			j += 1
		ans += 1
		j += 1
	else:
		pos += 1
		d[pos] = i
		i = j
		j += 1
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


string_inicial = list(input())
lista2 = []
jogador1 = False
for s in string_inicial:
	if lista2 == []:
		lista2.append(s)
		continue
	e = lista2[-1]
	if s == e:
		lista2.pop()
		jogador1 = not jogador1
	else:
		lista2.append(s)
if jogador1:
	print('Yes')
else:
	print('No')


def B():
	s = input()
	stack = []
	counter = 0
	for x in s:
		if not len(stack):
			stack.append(x)
		elif stack[-1] == x:
			stack.pop()
			counter += 1
		else:
			stack.append(x)
	print('Yes') if counter % 2 else print('No')
B()


from math import ceil
from collections import deque

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())
s = si()
c = 0
n = len(s)
s = list(s)
q = deque()
for i in s:
	if len(q) != 0 and q[len(q) - 1] == i:
		c += 1
		q.pop()
	else:
		q.append(i)
if c % 2:
	print('Yes')
else:
	print('No')


s = input()
stack = []
for c in s:
	if stack and stack[-1] == c:
		stack.pop()
	else:
		stack.append(c)
res = (len(s) - len(stack)) // 2
print(('No', 'Yes')[res % 2 == 1])


s = input()
t = [0] * (len(s) + 1)
(top, ans) = (0, 0)
for i in range(len(s)):
	if s[i] == t[top]:
		top -= 1
		ans ^= 1
	else:
		top += 1
		t[top] = s[i]
print('Yes' if ans else 'No')


chars = input()
l = []
cnt = 0
l.append(chars[0])
for i in range(1, len(chars)):
	tem = chars[i]
	if not len(l):
		l.append(tem)
		continue
	if l[-1] == tem:
		cnt += 1
		l.pop()
	else:
		l.append(tem)
if cnt & 1:
	print('Yes')
else:
	print('No')


s = input()
n = len(s)
a = []
a.append(s[0])
ans = 0
for i in range(1, n):
	if a:
		cur = a.pop()
		if cur == s[i]:
			ans += 1
			continue
		else:
			a.append(cur)
			a.append(s[i])
	else:
		a.append(s[i])
if ans % 2:
	print('Yes')
else:
	print('No')


s = input()
st = []
st.append(s[0])
turn = 0
for i in range(1, len(s)):
	if len(st) != 0 and s[i] == st[-1]:
		st.pop()
		turn += 1
	else:
		st.append(s[i])
if turn % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = []
stack.append(s[0])
last = 0
pop_cnt = 0
for i in range(1, len(s)):
	if len(stack) > 0:
		if s[i] != stack[last]:
			stack.append(s[i])
			last += 1
		else:
			stack.pop(last)
			last = last - 1
			pop_cnt += 1
	else:
		stack.append(s[i])
		last += 1
if pop_cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
r = 0
l = []
for i in range(0, len(s)):
	if len(l) == 0:
		l.append(s[i])
	elif s[i] == l[len(l) - 1]:
		l.pop()
		r += 1
	else:
		l.append(s[i])
if r % 2 == 0:
	print('No')
else:
	print('Yes')


string = list(input())
aux = []
count = 0
for i in range(len(string)):
	if len(aux) == 0:
		aux.append(string[i])
	elif string[i] == aux[len(aux) - 1]:
		aux.pop()
		count += 1
	else:
		aux.append(string[i])
if count % 2 == 1:
	print('Yes')
else:
	print('No')


t = []
c = 0
s = input()
for i in range(len(s)):
	if t == [] or t[-1] != s[i]:
		t.append(s[i])
	else:
		c += 1
		t.pop()
if c % 2:
	print('Yes')
else:
	print('No')


s = []
entrada = input()
removidos = 0
for x in entrada:
	if len(s) > 0 and s[len(s) - 1] == x:
		s.pop()
		removidos += 1
	else:
		s.append(x)
if removidos % 2 == 0:
	print('No')
else:
	print('Yes')


import sys
sys.setrecursionlimit(10 ** 5 + 1)
inf = int(10 ** 20)
max_val = inf
min_val = -inf
RW = lambda : sys.stdin.readline().strip()
RI = lambda : int(RW())
RMI = lambda : [int(x) for x in sys.stdin.readline().strip().split()]
RWI = lambda : [x for x in sys.stdin.readline().strip().split()]
given = input()
stack = ['']
cnts = 0
for g in given:
	if g == stack[-1]:
		cnts += 1
		stack.pop()
	else:
		stack.append(g)
print(['No', 'Yes'][cnts % 2])


s = list(input())
cnt = 0
a = []
i = 0
while i < len(s):
	if len(a) == 0:
		a.append(s[i])
	elif s[i] == a[-1]:
		cnt += 1
		a.pop()
	else:
		a.append(s[i])
	i += 1
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
l = []
cnt = 0
for i in range(len(s)):
	if len(l) == 0:
		l.append(s[i])
	else:
		x = l[len(l) - 1]
		if x == s[i]:
			cnt = cnt + 1
			l.pop(len(l) - 1)
		else:
			l.append(s[i])
if cnt % 2 == 0:
	print('NO')
else:
	print('YES')


import sys
import math

def read_int():
	return int(input().strip())

def read_int_list():
	return list(map(int, input().strip().split()))

def read_string():
	return input().strip()

def read_string_list(delim=' '):
	return input().strip().split(delim)
s = read_string()
stack = []
num = 0
if len(s) <= 1:
	print('No')
	sys.exit()
for _s in s:
	if stack == []:
		stack.append(_s)
	elif _s == stack[-1]:
		num += 1
		stack.pop()
	else:
		stack.append(_s)
if num % 2 == 1:
	print('Yes')
else:
	print('No')


s = input()
stack = [s[0]]
del_num = 0
for l in s[1:]:
	if len(stack) > 0 and l == stack[-1]:
		del stack[-1]
		del_num += 1
	else:
		stack.append(l)
if del_num % 2 == 0:
	print('No')
else:
	print('Yes')


a_string = input()
letters = list(a_string)
lengte = len(letters)
teller = 0
aantal = 0
antwoord = 'No'
while teller < lengte - 1:
	if letters[teller] == letters[teller + 1]:
		letters.pop(teller)
		letters.pop(teller)
		aantal = aantal + 1
		if teller > 0:
			teller = teller - 1
		lengte = len(letters)
	else:
		teller = teller + 1
if aantal % 2 == 1:
	antwoord = 'Yes'
print(antwoord)


word = list(input())
n = len(word)
emptyword = []
popcount = 0
for i in range(n):
	if len(emptyword) == 0:
		emptyword = [word[i]]
	elif word[i] == emptyword[-1]:
		emptyword.pop()
		popcount += 1
	else:
		emptyword.append(word[i])
if popcount % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = ''
win = False
for i in s:
	if stack != '' and i == stack[-1]:
		stack = stack[:-1]
		win = not win
	else:
		stack += i
if win:
	print('Yes')
else:
	print('No')


import sys

def solve(string):
	stack = []
	stack.append(string[0])
	player_move = False
	for i in range(1, len(string)):
		if len(stack) > 0 and string[i] == stack[len(stack) - 1]:
			stack.pop()
			if player_move == True:
				player_move = False
			else:
				player_move = True
		else:
			stack.append(string[i])
	if player_move:
		print('Yes')
	else:
		print('No')
for ln in sys.stdin:
	solve(ln)


s = str(input())
n = len(s)
ans = 0
s = [ord(i) - ord('a') for i in s]
q = [s[0]]
i = 1
while i < n:
	if not q:
		q.append(s[i])
	elif s[i] == q[-1]:
		q.pop()
		ans += 1
	else:
		q.append(s[i])
	i += 1
if ans % 2 == 1:
	print('YES')
else:
	print('NO')


k = 1
a = input()
s = [ord(a[0])]
for i in a[1:]:
	if s == []:
		s.append(ord(i))
	elif s[-1] == ord(i):
		k += 1
		k %= 2
		s.pop()
	else:
		s.append(ord(i))
if k == 1:
	print('No')
else:
	print('Yes')


def main():
	s = input()
	stack = []
	for c in s:
		if not stack:
			stack.append(c)
		elif c != stack[-1]:
			stack.append(c)
		else:
			stack.pop(-1)
	nb = len(s) - len(stack)
	if nb % 4 == 0:
		print('No')
	else:
		print('Yes')
main()


s = input()
stack = []
counter = 0
for c in s:
	if stack and stack[-1] == c:
		counter += 1
		stack.pop(-1)
		continue
	stack.append(c)
if counter % 2 == 0:
	print('No')
else:
	print('Yes')


palavra = input()
resp = 'No'
pilha = []
i = 0
while i <= len(palavra) - 1:
	if len(pilha) == 0:
		pilha.append(palavra[i])
	elif pilha[-1] == palavra[i]:
		pilha.pop()
		if resp == 'No':
			resp = 'Yes'
		else:
			resp = 'No'
	else:
		pilha.append(palavra[i])
	i = i + 1
print(resp)


s = input()
n = len(s)
p = '*'
c = 0
l = 1
for i in range(n):
	if s[i] == p[l - 1]:
		p = p[:l - 1]
		l = l - 1
		c += 1
	else:
		p += s[i]
		l += 1
if c % 2 != 0:
	print('Yes')
else:
	print('No')


import sys
inf = float('inf')

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()
s = input()
n = len(s)
l = []
count = 0
for i in s:
	if len(l) != 0 and l[-1] == i:
		l.pop()
		count += 1
	else:
		l.append(i)
if len(l) == n:
	print('NO')
elif count % 2:
	print('YES')
else:
	print('NO')


from sys import stdin, stdout
nmbr = lambda : int(stdin.readline())
lst = lambda : list(map(int, stdin.readline().split()))
for _ in range(1):
	s = input()
	n = len(s)
	st = [' '] * n
	p = ans = 0
	for ch in s:
		if p == 0 or ch != st[p - 1]:
			st[p] = ch
			p += 1
		else:
			ans += 1
			p -= 1
	print('Yes' if ans & 1 else 'No')


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
s = input()
l = [0]
turn = 1
for i in s:
	l.append(i)
	while len(l) > 1 and l[-1] == l[-2]:
		l.pop()
		l.pop()
		turn = 1 if turn == 2 else 2
if turn == 2:
	print('Yes')
else:
	print('No')


from sys import stdin, stdout, setrecursionlimit
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm, accumulate
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
setrecursionlimit(10 ** 9)
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return input()

def num():
	return int(input())

def L():
	return list(sp())

def LF():
	return list(spf())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def spf():
	return map(int, input.readline().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def pmat(A):
	for ele in A:
		print(*ele, end='\n')

def pmat2(A):
	for ele in A:
		for j in ele:
			print(j, end='')
		print()

def iseven(n):
	return n % 2 == 0

def seive(r):
	prime = [1 for i in range(r + 1)]
	prime[0] = 0
	prime[1] = 0
	for i in range(r + 1):
		if prime[i]:
			for j in range(2 * i, r + 1, i):
				prime[j] = 0
	return prime

def solve(s):
	stack = []
	ans = 0
	for i in s:
		try:
			if stack[-1] == i:
				stack.pop()
				ans += 1
			else:
				stack.append(i)
		except:
			stack.append(i)
			continue
	return ans % 2
string = input()
print('Yes' if solve(string) else 'No')
endtime = time.time()


p = input()
count = 0
s = ['']
for i in p:
	if s[-1] == i:
		s.pop()
		count += 1
	else:
		s.append(i)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


class Stack(object):

	def __init__(self):
		self.items = []

	def isEmpty(self):
		return self.items == []

	def append(self, item):
		self.items.append(item)

	def pop(self):
		return self.items.pop()

	def peek(self):
		return self.items[len(self.items) - 1]

	def size(self):
		return len(self.items)

def checkgame(string):
	stack = Stack()
	i = 0
	pops = 0
	while i < len(string):
		consider = string[i]
		if stack.isEmpty():
			stack.append(consider)
			i += 1
			continue
		if stack.peek() == consider:
			stack.pop()
			pops += 1
		else:
			stack.append(consider)
		i += 1
	if pops % 2 == 0:
		print('No')
	else:
		print('Yes')
game = input('')
checkgame(game)


import sys
import functools
data = sys.stdin.read().splitlines()
s = data[0]
stack = []
cnt = 0
for ch in s:
	if stack and stack[-1] == ch:
		stack.pop()
		cnt += 1
	else:
		stack.append(ch)
print('YES' if cnt & 1 == 1 else 'NO')


s = list(input())
c = i = 0
i = 1
while i < len(s):
	if s[i] == s[i - 1]:
		del s[i]
		del s[i - 1]
		c += 1
		i = max(0, i - 2)
	i += 1
if c % 2 != 0:
	print('Yes')
else:
	print('No')


def remove_chars_recursively(string):
	str_list = list(string)
	temp_stack = []
	ndx = 0
	while ndx < len(str_list):
		if len(temp_stack) > 0 and str_list[ndx] is temp_stack[-1]:
			repeating_char = temp_stack.pop(-1)
		else:
			temp_stack.append(str_list[ndx])
		ndx += 1
	return ''.join(temp_stack)
s = input()
len1 = len(s)
a = remove_chars_recursively(s)
len2 = len(a)
ans = len1 - len2
ans = ans // 2
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


count = 0
i = 0
words = list(input())
while i + 1 < len(words) and len(words) >= 2:
	if words[i] == words[i + 1]:
		count += 1
		del words[i:i + 2]
		i -= 1
		if i < 0:
			i = 0
	else:
		i += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


gi = lambda : list(map(int, input().split()))
s = input()
stack = []
ans = 1
for e in s:
	if stack and e == stack[-1]:
		ans += 1
		stack.pop()
	else:
		stack.append(e)
print('YNeos'[ans % 2::2])


s = list(input())
player1 = True
pointer = 0
while pointer < len(s) - 1:
	if s[pointer] == s[pointer + 1]:
		s.pop(pointer)
		s.pop(pointer)
		if pointer != 0:
			pointer -= 1
		player1 = not player1
	else:
		pointer += 1
if player1:
	print('No')
else:
	print('Yes')


st = []
s = input()
cn = 0
for i in s:
	st.append(i)
	while len(st) >= 2 and st[-2] == st[-1]:
		st.pop()
		st.pop()
		cn += 1
print('Yes' if cn % 2 == 1 else 'No')


from collections import defaultdict, deque
stack = deque()
score = 0
for c in input():
	if stack and stack[-1] == c:
		score += 1
		stack.pop()
	else:
		stack.append(c)
print(['No', 'Yes'][score % 2])


s = list(input())
moves = 0
stack = []
i = 0
while i < len(s):
	if len(stack) and stack[-1] == s[i]:
		stack.pop()
		moves += 1
	else:
		stack.append(s[i])
	i += 1
if moves % 2 == 0:
	print('No')
else:
	print('Yes')


_str = input()
_list = []
count = 0
check = False
rev = 2
for i in range(len(_str)):
	_list.append(_str[i])
	if len(_list) < 2:
		continue
	if _list[len(_list) - 1] == _list[len(_list) - 2]:
		count += 1
		_list.pop()
		_list.pop()
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input().rstrip()
ans = 'No'
st = []
num = 0
for i in range(len(s)):
	c = s[i]
	if len(st) == 0:
		st.append(c)
	elif st[-1] == c:
		st.pop()
		num += 1
	else:
		st.append(c)
ans = 'No' if num % 2 == 0 else 'Yes'
print(ans)


from collections import deque
s = list(input())
queue = deque()
b = False
for x in s:
	if not queue:
		queue.append(x)
	elif x == queue[-1]:
		b = not b
		queue.pop()
	else:
		queue.append(x)
if not b:
	print('No')
else:
	print('Yes')


s = input()
count = 0
i = 0
j = 1
prev = []
n = len(s)
while i < n - 1 and j < n:
	if s[i] != s[j]:
		prev.append(i)
		i = j
		j = j + 1
	else:
		count += 1
		if len(prev) != 0:
			i = prev.pop()
			j += 1
		else:
			i = j + 1
			j += 2
if count % 2 == 0:
	print('NO')
else:
	print('YES')


p = []
s = input()
count = 0
for i in range(len(s)):
	if p == []:
		p.append(s[i])
		continue
	x = p.pop()
	if x == s[i]:
		count += 1
		continue
	p.append(x)
	p.append(s[i])
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = [tmp for tmp in input().strip()]
o = 0
l = 0
ls = len(s)
while l < ls - 1:
	if s[l] != s[l + 1]:
		l += 1
	else:
		o += 1
		del s[l + 1]
		del s[l]
		ls -= 2
		if l != 0:
			l -= 1
print('Yes' if o % 2 == 1 else 'No')


s = '0' + input()
tot = [' ']
counter = 0
for i in range(len(s)):
	if s[i] == tot[-1]:
		tot.pop()
		counter += 1
	else:
		tot.append(s[i])
if counter % 2 == 0:
	print('No')
else:
	print('Yes')


import sys
from bisect import bisect_left, bisect_right, insort
from collections import deque, Counter
from math import gcd, sqrt, factorial, ceil, log10, log2
from itertools import permutations
from heapq import heappush, heappop, heapify
inf = float('inf')
mod = 1000000007

def factorial_p(n, p):
	ans = 1
	if n <= p // 2:
		for i in range(1, n + 1):
			ans = ans * i % p
	else:
		for i in range(1, p - n):
			ans = ans * i % p
		ans = pow(ans, p - 2, p)
		if n % 2 == 0:
			ans = p - ans
	return ans

def nCr_p(n, r, p):
	ans = 1
	while n != 0 or r != 0:
		(a, b) = (n % p, r % p)
		if a < b:
			return 0
		ans = ans * factorial_p(a, p) * pow(factorial_p(b, p), p - 2, p) * pow(factorial_p(a - b, p), p - 2, p) % p
		n //= p
		r //= p
	return ans

def prime_sieve(n):
	flag = n % 6 == 2
	sieve = bytearray((n // 3 + flag >> 3) + 1)
	for i in range(1, int(n ** 0.5) // 3 + 1):
		if not sieve[i >> 3] >> (i & 7) & 1:
			k = 3 * i + 1 | 1
			for j in range(k * k // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
			for j in range(k * (k - 2 * (i & 1) + 4) // 3, n // 3 + flag, 2 * k):
				sieve[j >> 3] |= 1 << (j & 7)
	return sieve

def prime_list(n):
	res = []
	if n > 1:
		res.append(2)
	if n > 2:
		res.append(3)
	if n > 4:
		sieve = prime_sieve(n + 1)
		res.extend((3 * i + 1 | 1 for i in range(1, (n + 1) // 3 + (n % 6 == 1)) if not sieve[i >> 3] >> (i & 7) & 1))
	return res

def binary(number):
	result = 0
	while number:
		result = result + 1
		number = number & number - 1
	return result

def is_prime(n):
	if n < 5 or n & 1 == 0 or n % 3 == 0:
		return 2 <= n <= 3
	s = (n - 1 & 1 - n).bit_length() - 1
	d = n >> s
	for a in [2, 325, 9375, 28178, 450775, 9780504, 1795265022]:
		p = pow(a, d, n)
		if p == 1 or p == n - 1 or a % n == 0:
			continue
		for _ in range(s):
			p = p * p % n
			if p == n - 1:
				break
		else:
			return False
	return True

def all_factors(n):
	(small, large) = ([], [])
	for i in range(1, int(n ** 0.5) + 1, 2 if n & 1 else 1):
		if not n % i:
			small.append(i)
			large.append(n // i)
	if small[-1] == large[-1]:
		large.pop()
	large.reverse()
	small.extend(large)
	return small

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
string = input()
l = len(string)
stack = []
m = 0
cp = 0
while m < l:
	if stack == []:
		stack.append(string[m])
	elif stack[-1] == string[m]:
		stack.pop()
		cp += 1
	else:
		stack.append(string[m])
	m += 1
if cp & 1:
	print('YES')
else:
	print('NO')


res = 1
stack = ['1', '2']
for c in input():
	sp = stack.pop()
	if c != sp:
		stack.append(sp)
		stack.append(c)
	else:
		res = 3 - res
if res != 1:
	print('Yes')
else:
	print('No')


game_str = input()
cnt = 0
duplicate = ['']
for char in game_str:
	if char == duplicate[-1]:
		duplicate.pop()
		cnt += 1
	else:
		duplicate.append(char)
if cnt % 2 != 0:
	print('YES')
else:
	print('NO')


from collections import deque
d = deque(input())
(c, r) = (0, 0)
l = len(d)
for i in range(l - 1):
	if d[0] == d[1]:
		c += 1
		d.popleft()
		d.popleft()
		l -= 2
		if r > 0:
			d.rotate(1)
			r -= 1
	else:
		d.rotate(-1)
		r += 1
	if l < 2:
		break
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = []
Cnt = 0
for i in s:
	if len(stack) >= 1:
		if i == stack[-1]:
			stack.pop()
			Cnt += 1
		else:
			stack.append(i)
	else:
		stack.append(i)
print('No' if Cnt % 2 == 0 else 'Yes')


z = ['keertan']
c = 0
for i in input():
	if i == z[-1]:
		z.pop()
		c += 1
	else:
		z += [i]
print('NYoe s'[c % 2::2])


s = str(input())
L = []
d = 0
for i in s:
	if len(L) == 0:
		L.append('')
	if i == L[len(L) - 1]:
		L.pop()
		d = d + 1
	else:
		L.append(i)
if d % 2 == 1:
	print('YES')
else:
	print('NO')


s = input().strip()
stack = []
counter = 0
for i in s:
	if stack and stack[-1] == i:
		counter += 1
		stack.pop()
	else:
		stack.append(i)
if counter % 2 == 0:
	print('No')
else:
	print('Yes')


import sys, math, bisect
from random import randint
inf = float('inf')
mod = 10 ** 9 + 7

def lcm(a, b):
	return int(a / math.gcd(a, b) * b)

def gcd(a, b):
	return int(math.gcd(a, b))

def tobinary(n):
	return bin(n)[2:]

def binarySearch(a, x):
	i = bisect.bisect_left(a, x)
	if i != len(a) and a[i] == x:
		return i
	else:
		return -1

def lowerBound(a, x):
	i = bisect.bisect_left(a, x)
	if i:
		return i - 1
	else:
		return -1

def upperBound(a, x):
	i = bisect.bisect_right(a, x)
	if i != len(a) + 1 and a[i - 1] == x:
		return i - 1
	else:
		return -1

def primesInRange(n):
	ans = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			ans.append(p)
	return ans

def primeFactors(n):
	factors = []
	while n % 2 == 0:
		factors.append(2)
		n = n // 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			factors.append(i)
			n = n // i
	if n > 2:
		factors.append(n)
	return factors

def isPrime(n, k=5):
	if n < 2:
		return True
	for i in range(0, k):
		a = randint(1, n - 1)
		if pow(a, n - 1, n) != 1:
			return False
	return True
from collections import deque, defaultdict, Counter
import heapq, string
for _ in range(1):
	s = input()
	stack = [s[0]]
	cnt = 0
	n = len(s)
	for i in range(1, n):
		if stack and stack[-1] == s[i]:
			cnt += 1
			stack.pop()
		else:
			stack.append(s[i])
	if cnt == 0:
		print('No')
	elif cnt % 2 == 0:
		print('No')
	else:
		print('Yes')


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import defaultdict
from itertools import combinations
import functools
import sys
import math
MAX = sys.maxsize
MAXN = 10 ** 6 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b, x, y):
	return abs(a - x) + abs(b - y)

def numIN():
	return map(int, sys.stdin.readline().strip().split())

def charIN():
	return sys.stdin.readline().strip().split()

def ncr(n, k):
	res = 1
	c = [0] * (k + 1)
	c[0] = 1
	for i in range(1, n + 1):
		for j in range(min(i, k), 0, -1):
			c[j] = (c[j] + c[j - 1]) % MOD
	return c[k]
s = input()
l = ['*']
c = 0
for i in s:
	if i == l[-1]:
		c += 1
		l.pop()
	else:
		l.append(i)
if c % 2:
	print('Yes')
else:
	print('No')


D = [*input()]
k = [D[0]]
t = 0
for i in range(1, len(D)):
	if len(k) >= 1:
		if D[i] == k[len(k) - 1]:
			k.pop()
			t += 1
		else:
			k.append(D[i])
	else:
		k.append(D[i])
print(['No', 'Yes'][t % 2 == 1])


def main():
	s = input()
	playCount = 0
	stack = []
	for c in s:
		if len(stack) == 0:
			stack.append(c)
		elif stack[-1] == c:
			stack.pop()
			playCount += 1
		else:
			stack.append(c)
	if playCount % 2 == 1:
		print('Yes')
	else:
		print('No')
main()


import math
from collections import Counter, deque
L = lambda : list(map(int, input().split()))
M = lambda : map(int, input().split())
I = lambda : int(input())
IN = lambda : input()
mod = 10 ** 9 + 7

def s(a):
	print(' '.join(list(map(str, a))))
n = IN()
a = [n[0]]
i = 1
c = 0
while len(n) > i:
	a.append(n[i])
	if len(a) > 1:
		if a[-1] == a[-2]:
			a.pop()
			a.pop()
			c += 1
	i += 1
if c % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
st = []
c = 0
for i in s:
	if st == []:
		st.append(i)
	elif st[-1] == i:
		c += 1
		st.pop()
	else:
		st.append(i)
print('Yes' if c % 2 else 'No')


s = input()
pred = ''
cnt = 0
ind = 0
for ch in range(len(s)):
	ch -= ind
	if s[ch] == pred:
		if ch - 2 >= 0:
			pred = s[ch - 2]
		else:
			pred = ''
		s = s[:ch - 1] + s[ch + 1:]
		cnt += 1
		ind += 2
	else:
		pred = s[ch]
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = list(input())
d = [s[0]]
count = 0
for i in range(1, len(s)):
	if len(d) == 0:
		d.append(s[i])
	else:
		x = d.pop()
		if x == s[i]:
			count += 1
		else:
			d.append(x)
			d.append(s[i])
if count % 2 == 0:
	print('No')
else:
	print('Yes')


def io():
	return map(int, input().split())

def op():
	return list(map(int, input().split()))

def kl(con, x=0):
	if x == 1 and con:
		print('Yes')
	elif x == 1 and (not con):
		print('No')
	else:
		print('yes') if con else print('no')
s = input()
n = len(s)
c = 0
i = 0
l = []
for i in range(len(s)):
	if not l:
		l.append(s[i])
	elif s[i] == l[-1]:
		l.pop()
		c += 1
	else:
		l.append(s[i])
kl(c & 1)


s = input()
n = len(s)
stk = []
cnt = 0
for i in s:
	if not stk:
		stk.append(i)
	elif i == stk[-1]:
		stk.pop()
		cnt += 1
	else:
		stk.append(i)
if cnt & 1:
	print('Yes')
else:
	print('No')


s = list(input())
turn = 0
restart = True
i = 0
while i < len(s) - 1:
	if s[i] == s[i + 1]:
		turn += 1
		s.pop(i)
		s.pop(i)
		if i > 0:
			i -= 1
	else:
		i += 1
if turn % 2 == 1:
	print('Yes')
else:
	print('No')


class Stack:

	def __init__(self):
		self.items = []

	def isEmpty(self):
		return self.items == []

	def push(self, item):
		self.items.append(item)

	def pop(self):
		return self.items.pop()

	def peek(self):
		return self.items[len(self.items) - 1]

	def size(self):
		return len(self.items)
count = 0
n = input()
my = list(n)
s = Stack()
s.push(my[0])
for i in my[1:]:
	if s.isEmpty():
		s.push(i)
		continue
	a = s.pop()
	if a == i:
		count += 1
	else:
		s.push(a)
		s.push(i)
if count % 2 != 0:
	print('Yes')
else:
	print('No')


s = input()
cnt = 0
stack = []
for i in s:
	try:
		check = stack.pop()
	except:
		check = ''
	if check != i:
		stack.append(check)
		stack.append(i)
	else:
		cnt += 1
if cnt % 2:
	print('Yes')
else:
	print('No')


import sys
from math import *
from copy import copy
import pdb
s = input()
stack = []
pobeda = 0
for i in s:
	if len(stack) == 0:
		stack.append(i)
		continue
	if stack[-1] == i:
		stack.pop()
		pobeda += 1
	else:
		stack.append(i)
if pobeda % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
st = ' '
for c in s:
	if c == st[-1]:
		st = st[:-1]
	else:
		st += c
if (len(s) - (len(st) - 1)) // 2 % 2:
	print('Yes')
else:
	print('No')


corda = input()
pilha = []
vencendor = 2
for i in range(len(corda)):
	if len(pilha) == 0:
		pilha.append(corda[i])
	elif pilha[-1] == corda[i]:
		pilha.pop()
		if vencendor == 2:
			vencendor = 1
		else:
			vencendor = 2
	else:
		pilha.append(corda[i])
if vencendor == 1:
	print('Yes')
else:
	print('No')


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict, deque, Counter, OrderedDict
import threading
from heapq import *
(dx, dy) = ([1, -1, 0, 0], [0, 0, 1, -1])

def main():
	s = input()
	ans = 0
	i = 1
	while 1:
		if i >= len(s):
			break
		if s[i] == s[i - 1]:
			ans += 1
			s = s[:i - 1] + s[i + 1:]
			if i > 1:
				i -= 1
		else:
			i += 1
	if ans % 2 == 1:
		print('Yes')
	else:
		print('No')
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()


s = input()
keep_playing = True
num_games = 0
last = 1
while keep_playing:
	keep_playing = False
	num_games += 1
	size = len(s)
	for i in range(last, size):
		if s[i] == s[i - 1]:
			s = s[0:i - 1] + s[i + 1:size]
			keep_playing = True
			last = max(1, i - 2)
			break
if num_games % 2 == 0:
	print('Yes')
else:
	print('No')


s = list(input())
stack = []
ans = 0
for i in range(len(s)):
	if len(stack) >= 2:
		if stack[len(stack) - 1] == stack[len(stack) - 2]:
			stack.pop()
			stack.pop()
			ans += 1
	stack.append(s[i])
if len(stack) >= 2:
	if stack[len(stack) - 1] == stack[len(stack) - 2]:
		stack.pop()
		stack.pop()
		ans += 1
if ans % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
A = []
k = 0
for i in range(len(s)):
	if A == [] or s[i] != A[-1]:
		A.append(s[i])
	else:
		A.pop(-1)
		k += 1
if k % 2 == 0:
	print('NO')
else:
	print('YES')


from __future__ import division, print_function
from sys import stdin, stdout
import bisect
import math
import heapq

def modinv(n, p):
	return pow(n, p - 2, p)

def cin():
	return map(int, sin().split())

def ain():
	return list(map(int, sin().split()))

def sin():
	return input()

def inin():
	return int(input())
import math

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l
q = []

def dfs(n, d, v, c):
	global q
	v[n] = 1
	x = d[n]
	q.append(n)
	j = c
	for i in x:
		if i not in v:
			f = dfs(i, d, v, c + 1)
			j = max(j, f)
	return j

def main():
	s = sin()
	a = []
	x = 0
	for i in s:
		if len(a) > 0 and a[-1] == i:
			a.pop()
			x ^= 1
		else:
			a.append(i)
	if x:
		print('Yes')
	else:
		print('No')
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
import os, sys
from io import IOBase, BytesIO
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

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

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			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')
import sys

class ostream:

	def __lshift__(self, a):
		sys.stdout.write(str(a))
		return self
cout = ostream()
endl = '\n'

def readnumbers(zero=0):
	conv = ord if py2 else lambda x: x
	A = []
	numb = zero
	sign = 1
	i = 0
	s = sys.stdin.buffer.read()
	try:
		while True:
			if s[i] >= b'0'[0]:
				numb = 10 * numb + conv(s[i]) - 48
			elif s[i] == b'-'[0]:
				sign = -1
			elif s[i] != b'\r'[0]:
				A.append(sign * numb)
				numb = zero
				sign = 1
			i += 1
	except:
		pass
	if s and s[-1] >= b'0'[0]:
		A.append(sign * numb)
	return A
main()


def turn(new, old):
	if len(new) < 2:
		return (new, old, False)
	for i in range(len(new) - 1, 0, -1):
		if new[i] == new[i - 1]:
			new.pop()
			new.pop()
			if len(old) > 0:
				letter = old.pop()
				new.append(letter)
			return (new, old, True)
		else:
			letter = new.pop()
			old.append(letter)
	return (new, old, False)

def f(s):
	counter = -1
	worked = True
	old = []
	new = [char for char in s[::-1]]
	while worked:
		(new, old, worked) = turn(new, old)
		if worked:
			counter += 1
	return counter % 2
s = input()
if f(s) == 0:
	print('YES')
else:
	print('NO')


n = input()
lst = []
cnt = 0
for i in n:
	if len(lst) == 0:
		lst.append(i)
	elif i == lst[-1]:
		lst.pop()
		cnt += 1
	else:
		lst.append(i)
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
n = len(s)
a = []
ans = 0
for c in s:
	if len(a) == 0:
		a.append(c)
	elif c == a[-1]:
		ans += 1
		a.pop()
	else:
		a.append(c)
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


def Q2():
	import sys
	for line in sys.stdin:
		stack = []
		player_one = True
		for i in line:
			if len(stack) == 0:
				stack.append(i)
			elif i == stack[-1]:
				stack.pop()
				player_one = False if player_one else True
			else:
				stack.append(i)
		print('No') if player_one else print('Yes')
		return
Q2()


list_int_input = lambda inp: list(map(int, inp.split()))
int_input = lambda inp: int(inp)
string_to_list_input = lambda inp: list(inp)
s = input()
a = []
(i, lim) = (0, -1)
while i < len(s) - 1:
	j = i + 1
	if s[i] == s[j]:
		while True:
			while i > lim and j < len(s) and (s[i] == s[j]):
				i -= 1
				j += 1
			i += 1
			j -= 1
			if lim > 0 and lim + 1 == i:
				i = a[-1][0] - 1
				j += 1
				a = a[:-1]
				if a:
					lim = a[-1][1]
				else:
					lim = -1
			else:
				a.append((i, j))
				lim = j
				i = j + 1
				break
	else:
		i += 1
cnt = 0
for i in a:
	cnt += int((i[1] - i[0] + 1) / 2)
print('No' if cnt % 2 == 0 else 'Yes')


from sys import stdin

def reduce(s):
	news = []
	oldc = s[0]
	oldnewc = '0'
	ls = len(s)
	i = 0
	count = 1
	for i in range(1, ls):
		if s[i] == oldc:
			count = 1 - count
		else:
			if count:
				if oldc == oldnewc:
					news.pop()
					oldnewc = '0'
					if news:
						oldnewc = news[-1]
				else:
					news.append(oldc)
					oldnewc = oldc
			oldc = s[i]
			count = 1
	if count == 1:
		news.append(oldc)
	return ''.join(news)
s = stdin.readline().strip()
ls = len(s)
ls0 = ls
oldls = 0
while oldls != ls and s:
	s = reduce(s)
	(oldls, ls) = (ls, len(s))
moves = (ls0 - ls) // 2
if moves % 2 == 0:
	print('No')
else:
	print('Yes')


def kek(s):
	k = 0
	l = []
	while len(s) > 0:
		if len(l) == 0:
			l.append(s.pop(0))
			continue
		elif s[0] != l[-1]:
			l.append(s.pop(0))
		else:
			l.pop(-1)
			s.pop(0)
			k += 1
	if k % 2 == 0:
		return 'No'
	else:
		return 'Yes'
print(kek(list(input())))


from sys import stdin
input = stdin.readline
s = input()
c = 0
l = []
for i in s:
	if len(l) == 0:
		l.append(i)
	elif i == l[-1]:
		c += 1
		l.pop()
	else:
		l.append(i)
print('Yes' if c % 2 else 'No')


s = input()
a = []
turns = 0
for c in s:
	if len(a) > 0 and a[-1] == c:
		turns += 1
		a.pop()
	else:
		a.append(c)
print('Yes' if turns % 2 == 1 else 'No')


def solve():
	s = input()
	n = len(s)
	l = []
	x = 0
	cnt = 0
	for i in range(n):
		if x == 0 or l[x - 1] != s[i]:
			l.append(s[i])
			x += 1
		else:
			l.pop()
			cnt += 1
			x -= 1
	if cnt % 2 == 0:
		print('No')
	else:
		print('Yes')
t = 1
while t > 0:
	solve()
	t -= 1


from collections import deque
S = input()
H = deque()
N = len(S)
num = 0
for i in range(N):
	if len(H) > 0 and H[-1] == S[i]:
		num += 1
		H.pop()
	else:
		H.append(S[i])
if num % 2 == 1:
	print('Yes')
else:
	print('No')


def main():
	s = input()
	lista = []
	ans = 0
	for i in range(0, len(s)):
		if not len(lista):
			lista.append(s[i])
		elif s[i] == lista[-1]:
			lista.pop()
			ans += 1
		else:
			lista.append(s[i])
	if ans % 2:
		print('Yes')
	else:
		print('No')
main()


s = input()
first = False
t = []
for c in s:
	if len(t) > 0 and t[-1] == c:
		t.pop()
		first = not first
	else:
		t.append(c)
print('Yes' if first else 'No')


s = input()

class ListNode(object):

	def __init__(self, x):
		self.val = x
		self.next = None
		self.prev = None
l = len(s)
n = 0
cn = ListNode(s[0])
for i in range(1, l):
	cn.next = ListNode(s[i])
	prev = cn
	cn = cn.next
	cn.prev = prev
while cn is not None:
	if cn.next is not None:
		if cn.val == cn.next.val:
			if cn.prev is not None:
				if cn.next is not None:
					cn.prev.next = cn.next.next
				else:
					cn.prev.next = cn.next
			n += 1
	cn = cn.prev
if n % 2 == 1:
	print('Yes')
else:
	print('No')


s = list(input())
x = [s[0]]
count = 0
z = 1
for i in range(1, len(s)):
	if z > 0 and s[i] == x[-1]:
		x.pop(-1)
		count += 1
		z -= 1
	else:
		x.append(s[i])
		z += 1
if count % 2 == 0:
	print('NO')
else:
	print('YES')


from time import time

def rrr(inpstr):
	flag = True
	t = []
	for c in inpstr:
		if len(t) > 0:
			if c == t[-1]:
				t.pop()
				flag = not flag
				continue
		t.append(c)
	return flag
s = input()
t1 = time()
is_first = rrr(s)
print('No' if is_first else 'Yes')
t2 = time()


s = str(input())
t = '*'
c = 0
for i in s:
	t += i
	if t[-2] == i:
		t = t[:-2]
		c += 1
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
left = ['.']
cnt = 0
for char in s:
	if char == left[-1]:
		left.pop()
		cnt += 1
	else:
		left.append(char)
print('No' if cnt % 2 == 0 else 'Yes')


s = input()
d = set()
(answer, ans_answer) = (-1, 0)
while answer != 0:
	(q, answer) = (0, 0)
	while q < len(s) - 1:
		if s[q] == s[q + 1]:
			(q1, q) = (q, q + 1)
			while q1 > -1 and q < len(s) and (q not in d) and (q1 not in d) and (s[q] == s[q1]):
				d.add(q)
				d.add(q1)
				(q, q1) = (q + 1, q1 - 1)
				answer += 1
		else:
			q += 1
	ans_answer += answer
	s1 = []
	for q in range(len(s)):
		if q not in d:
			s1.append(s[q])
	s = ''.join(s1)
	d = set()
if ans_answer % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
w = 1
l = []
for c in s:
	if len(l) == 0:
		l.append(c)
	elif l[-1] == c:
		l.pop()
		if w == 1:
			w = 2
		else:
			w = 1
	else:
		l.append(c)
if w == 1:
	print('No')
else:
	print('Yes')


s = input()
lastIndex = len(s) - 2
i = 0
win = False
while lastIndex > -1:
	if s[i] == s[i + 1]:
		s = s[0:i] + s[i + 2:]
		if i != 0:
			i -= 1
		if win:
			win = False
		else:
			win = True
	else:
		i += 1
		lastIndex -= 1
	if i >= len(s) - 1:
		break
print('Yes' if win else 'No')


counter = 0
s = list(input())
n = len(s)
ans = ['#']
for i in range(0, n):
	if s[i] == ans[-1]:
		counter += 1
		ans.pop()
	else:
		ans.append(s[i])
if counter % 2 == 0:
	print('No')
else:
	print('Yes')


from collections import deque
palavra = str(input())
stack = deque()
result = 0
for i in range(len(palavra)):
	if len(stack) == 0:
		stack.append(palavra[i])
	elif palavra[i] == stack[len(stack) - 1]:
		stack.pop()
		result += 1
	else:
		stack.append(palavra[i])
if result % 2 == 0:
	print('No')
else:
	print('Yes')


import sys
from collections import deque

def main():
	fin = sys.stdin
	string = list(fin.readline().strip())
	dq = deque([])
	play = 0
	for char in string:
		if not dq:
			dq.append(char)
		elif dq[-1] == char:
			dq.pop()
			play = (play + 1) % 2
		else:
			dq.append(char)
	if play == 1:
		print('Yes')
	else:
		print('No')
main()


s = list(input())
i = 0
count = 0
length = len(s) - 1
while i < length:
	if s[i] == s[i + 1]:
		length = length - 2
		s.pop(i)
		s.pop(i)
		count = count + 1
		if i > 0:
			i -= 1
	else:
		i += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


from math import *
from collections import *
s = input()
stack = []
ct = 0
for i in s:
	if stack != [] and i == stack[-1]:
		stack.pop()
		ct += 1
	else:
		stack.append(i)
if ct % 2 == 0:
	print('No')
else:
	print('Yes')


a = list(input())
b = []
k = 0
for i in a:
	if b != [] and b[-1] == i:
		k += 1
		b.pop()
	else:
		b.append(i)
if k & 1:
	print('Yes')
else:
	print('No')


t = input()
g = []
turn = 0
for k in t:
	if len(g) == 0:
		g.append(k)
	elif k == g[-1]:
		g.pop()
		turn = abs(turn - 1)
	else:
		g.append(k)
if turn == 1:
	print('Yes')
else:
	print('No')


s = input()
a = [0]
answer = 0
for x in s:
	if x == a[len(a) - 1]:
		a.pop(len(a) - 1)
		answer += 1
	else:
		a.append(x)
print('Yes' if answer % 2 == 1 else 'No')


string = input()
pilha = [0]
c = 0
for i in string:
	if i == pilha[-1]:
		pilha.pop()
		c += 1
	else:
		pilha.append(i)
if c % 2 != 0:
	print('Yes')
else:
	print('No')


text = list(input())
first_player_wins = False
i = 0
while i < len(text) - 1:
	if text[i] == text[i + 1]:
		text.pop(i)
		text.pop(i)
		first_player_wins = False if first_player_wins else True
		if i > 0:
			i -= 1
	else:
		i += 1
print('Yes' if first_player_wins else 'No')


import itertools
import math
from collections import defaultdict

def input_ints():
	return list(map(int, input().split()))

def solve():
	s = input()
	d = 0
	x = []
	for c in s:
		if x and x[-1] == c:
			d ^= 1
			x.pop()
		else:
			x.append(c)
	print(['No', 'YES'][d])
solve()


import sys, string
arr = list(sys.stdin.readline().rstrip())
st = []
cnt = 0
for i in arr:
	if not st:
		st.append(i)
	elif st[-1] == i:
		cnt += 1
		st.pop()
	else:
		st.append(i)
print('YES' if cnt % 2 == 1 else 'NO')


st = []
count = 0
k = input()
for i in k:
	if len(st) > 0 and i == st[-1]:
		st.pop()
		count += 1
	else:
		st.append(i)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


string = input()
s = []
c = 0
for i in range(len(string)):
	if s and s[-1] == string[i]:
		s.pop()
		c += 1
	else:
		s.append(string[i])
if c & 1:
	print('Yes')
else:
	print('No')


s = input()
count = 0
temp = ''
i = 0
x = ''
y = ''
st = [0]
while i < len(s):
	if s[i] == st[-1]:
		count += 1
		st.pop()
	else:
		st.append(s[i])
	i += 1
if count % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
t = []
cnt = 0
for i in s:
	if t and i == t[-1]:
		cnt += 1
		t.pop(-1)
	else:
		t.append(i)
print('YES' if cnt % 2 != 0 else 'NO')


s = input()
s = list(s)
found = 0
ls = len(s)
mark = [0] * ls
i = 0
stack = []
ssl = 0
for i in s:
	stack.append(i)
	ssl += 1
	while ssl >= 2:
		if stack[-1] == stack[-2]:
			found += 1
			stack.pop()
			stack.pop()
			ssl -= 2
		else:
			break
if found % 2 == 0:
	print('No')
else:
	print('Yes')


s = input('')
t = []
res = 0
for i in s:
	if len(t) == 0:
		t.append(i)
	elif t[-1] == i:
		t.pop()
		res = res + 1
	else:
		t.append(i)
if res % 2 == 1:
	print('Yes')
else:
	print('No')


pal = input()
stack = []
ans = 2
for i in pal:
	if len(stack) == 0:
		stack.append(i)
	elif i == stack[len(stack) - 1]:
		ans += 1
		del stack[len(stack) - 1]
	else:
		stack.append(i)
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
a = []
count = 0
for ch in s:
	if a == [] or ch != a[-1]:
		a.append(ch)
	else:
		a.pop()
		count += 1
if count % 2 == 1:
	print('Yes')
else:
	print('No')


from collections import deque
s = deque(input())
other = []
count = 0
while s:
	if not other or other[-1] != s[0]:
		other.append(s.popleft())
	else:
		other.pop()
		s.popleft()
		count += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
k = 0

class Stack:

	def __init__(self):
		self.data = []

	def pop(self):
		return self.data.pop()

	def push(self, x):
		self.data.append(x)

	def isempty(self):
		if len(self.data) > 0:
			return False
		else:
			return True
stk = Stack()
for i in range(len(s)):
	stk.push(s[i])
	while len(stk.data) >= 2 and stk.data[len(stk.data) - 1] == stk.data[len(stk.data) - 2]:
		stk.pop()
		stk.pop()
		k = k + 1
k = k % 2
if k == 0:
	print('No')
else:
	print('Yes')


l = []
count = 0
for i in input():
	if l and i == l[-1]:
		l.pop()
		count += 1
	else:
		l.append(i)
print(['No', 'Yes'][count % 2])


a = input()
(v, q) = ([0], 0)
for i in range(len(a)):
	if a[i] != v[-1]:
		v.append(a[i])
	else:
		v.pop()
		q += 1
print(['NO', 'YES'][q % 2])


p = list(input())
j = 1
co = 0
stack = [p[0]]
while j < len(p):
	stack.append(p[j])
	if len(stack) >= 2 and stack[-1] == stack[-2]:
		stack.pop()
		stack.pop()
		co += 1
	j += 1
print('YES' if co % 2 != 0 else 'NO')


import math

def median(a: []):
	a.sort()
	if len(a) % 2 == 1:
		return a[len(a) // 2]
	return (a[len(a) // 2] + a[len(a) // 2 - 1]) / 2

def mode(a: []):
	g = {}
	m = -1
	for i in a:
		g[i] = g.get(i, 0) + 1
		m = max(m, g[i])
	ans = int(10000000.0)
	for i in g:
		if g[i] == m and ans > i:
			ans = i
	return ans

def avg(x: [], w: []):
	return round(sum([x[i] * w[i] for i in range(len(x))]) / sum(w), 1)

def avg(x: []):
	return sum(x) / len(x)

def quartiles(a: []):
	a.sort()
	m = len(a) // 2
	l = a[:m]
	if len(a) % 2 == 1:
		m += 1
	r = a[m:]
	return (median(l), median(a), median(r))

def std(a: []):
	u = avg(a)
	return math.sqrt(sum([(a[i] - u) ** 2 for i in range(len(a))]) / len(a))

def main():
	s = input()
	c = 0
	stack = list()
	for i in s:
		if len(stack) == 0 or stack[len(stack) - 1] != i:
			stack.append(i)
		else:
			stack.pop()
			c += 1
	if c % 2 == 1:
		print('Yes')
	else:
		print('No')
main()


s = input()
l = []
szum = 0
for i in range(len(s)):
	if len(l) == 0:
		l.append(s[i])
	elif s[i] == l[len(l) - 1]:
		l.pop(len(l) - 1)
		szum += 1
	else:
		l.append(s[i])
if szum % 2:
	print('YES', end='')
else:
	print('NO', end='')


s = [i for i in input()]
L = []
l = 0
c = 0
for i in s:
	if l > 0 and L[l - 1] == i:
		L.pop()
		l -= 1
		c += 1
	else:
		L.append(i)
		l += 1
print('YNeos'[c % 2 == 0::2])


def main():
	s = input()
	(times, stack) = (0, [])
	for c in s:
		if not stack or stack[-1] != c:
			stack.append(c)
		else:
			stack.pop()
			times += 1
	print('Yes' if times % 2 else 'No')
main()


def f(s):
	n = len(s)
	l = [s[0]]
	c = 0
	for i in range(1, n):
		if l != []:
			if s[i] == l[-1]:
				l.pop()
				c += 1
			else:
				l.append(s[i])
		else:
			l.append(s[i])
	if c % 2 == 1:
		print('Yes')
	else:
		print('No')
s = input()
f(s)


arr = list(input().strip())
c = 0
stack = []
for ele in arr:
	stack.append(ele)
	if len(stack) > 1:
		if stack[-1] == stack[-2]:
			stack.pop()
			stack.pop()
			c += 1
print(['No', 'Yes'][c % 2])


s = input()
st = ['.']
ch = 0
for i in s:
	if st[-1] == i:
		ch += 1
		st.pop()
	else:
		st.append(i)
print(['No', 'Yes'][ch & 1])


s = input()
left = ['yariklox']
cnt = 0
for ch in s:
	if ch == left[-1]:
		left.pop()
		cnt += 1
	else:
		left.append(ch)
if cnt % 2 == 0:
	print('NO')
else:
	print('YES')


s = list(input())
st = []
cnt = 0
for i in s:
	if len(st) == 0 or st[-1] != i:
		st.append(i)
	elif st[-1] == i:
		st.pop()
		cnt += 1
if cnt & 1:
	print('Yes')
else:
	print('No')


class node:

	def __init__(self, val, left, i):
		self.val = val
		self.left = left
		self.right = None
		if self.left:
			self.left.right = self
		self.i = i

def LinkedList(ls):
	left = last = node(ls[0], None, 0)
	t = True
	i = 0
	for l in ls:
		if t:
			t = False
			continue
		i += 1
		last = node(l, last, i)
	return left
s = list(input())
left = LinkedList(s)
pairs = 0
this = left
while this.right:
	if this.val == this.right.val:
		if this.left:
			this.left.right = this.right.right
		if this.right.right:
			this.right.right.left = this.left
		pairs += 1
		if this.left:
			this = this.left
		elif this.right.right:
			this = this.right.right
		else:
			break
	else:
		this = this.right
print('YES' if pairs & 1 else 'NO')


s = input()
t = 1
l1 = []
for item in s:
	if len(l1) > 0 and item == l1[-1]:
		l1.pop()
		t += 1
	else:
		l1.append(item)
print('No' if t % 2 else 'Yes')


s = [i for i in input()]
count = 0
st = []
n = len(s)
for i in range(n):
	if st:
		if s[i] == st[-1]:
			count += 1
			st.pop()
		else:
			st.append(s[i])
	else:
		st.append(s[i])
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
l = [i for i in s]
k = []
i = -1
temp = 0
while True:
	i += 1
	try:
		if k[len(k) - 1] == l[i]:
			k.pop(len(k) - 1)
			temp += 1
		else:
			k.append(l[i])
	except IndexError:
		if i < len(l):
			k.append(l[i])
		else:
			break
if temp % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
t = '.'
for i in s:
	if t[-1] == i:
		t = t[:-1]
	else:
		t += i
print(['Yes', 'No'][(len(s) - len(t)) // 2 % 2])


string = list(input())
working = [string[0]]
out = [0, 'Yes', 'No']
index = -1
for i in range(1, len(string)):
	if len(working) == 0:
		working += [string[i]]
	elif string[i] == working[-1]:
		working.pop(-1)
		index *= -1
	else:
		working += [string[i]]
print(out[index])


l = []
win = int(0)
for x in input():
	if len(l) != 0 and x == l[-1]:
		l.pop()
		win = 1 - win
	else:
		l.append(x)
print('Yes' if win == 1 else 'No')


s = input()
new = [s[0]]
count = 0
for i in range(1, len(s)):
	if new and new[-1] == s[i]:
		new.pop()
		count += 1
	else:
		new.append(s[i])
if count % 2 == 0:
	print('No')
else:
	print('Yes')


mystr = input()
left = ['']
count = 0
for ch in mystr:
	if ch == left[-1]:
		left.pop()
		count += 1
	else:
		left.append(ch)
if count % 2 == 1:
	print('YES')
else:
	print('NO')


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
MOD = 1000000007
T = 1
for _ in range(T):
	s = list(stdin.readline().strip('\n'))
	n = len(s)
	ans = 0
	a = []
	for i in range(n):
		if len(a) == 0:
			a.append(s[i])
		elif a[-1] != s[i]:
			a.append(s[i])
		else:
			a.pop()
			ans = 1 - ans
	if ans:
		print('Yes')
	else:
		print('No')


def main():
	s = input()
	stack = []
	ans = 'No'
	for x in range(0, len(s)):
		if len(stack) == 0 or stack[len(stack) - 1] != s[x]:
			stack.append(s[x])
		else:
			if ans == 'No':
				ans = 'Yes'
			else:
				ans = 'No'
			stack.pop()
	print(ans)
main()


s = input()
a = []
c = 0
l = len(s)
for i in range(l):
	if a and a[-1] == s[i]:
		a.pop()
		c += 1
	else:
		a.append(s[i])
if c % 2 != 0:
	print('Yes')
else:
	print('No')


import sys
import heapq
import math
lines = sys.stdin.read().splitlines()
s = lines[0]
i = 0
j = 1
count = 0

class Node:

	def __init__(self, letter):
		self.letter = letter
		self.next = None
		self.prev = None

def add(last, letter):
	node = Node(letter)
	last.next = node
	node.prev = last
	return node
head = Node(s[0])
last = head
for i in range(1, len(s)):
	last = add(last, s[i])
cur = head
next = head.next
while next != None:
	if cur.letter == next.letter:
		count += 1
		if cur.prev == None:
			cur = next.next
			if cur == None or cur.next == None:
				break
			next = cur.next
			cur.prev = None
			cur.next = next
			next.prev = cur
		else:
			next = next.next
			cur = cur.prev
			if next == None:
				break
			cur.next = next
			next.prev = cur
	else:
		next = next.next
		cur = cur.next
print('Yes' if count % 2 == 1 else 'No')


s = input()
x = -1
i = 0
n = len(s)
while n > 1 and i < n - 1:
	if s[i] == s[i + 1]:
		s = s[:i] + s[i + 2:]
		if i > 0:
			i -= 2
		else:
			i -= 1
		x *= -1
	i += 1
	n = len(s)
if x == -1:
	print('No')
else:
	print('Yes')


s = input()
stack = []
count = 0
for c in s:
	if stack and stack[-1] == c:
		stack.pop()
		count += 1
	else:
		stack.append(c)
print('Yes' if count & 1 else 'No')


b = input('')
a = [char for char in b]
sum = 0
x = 0
while x < len(a) - 1:
	if a[x] == a[x + 1]:
		sum += 1
		a.pop(x)
		a.pop(x)
		if x > 0:
			x = x - 1
	else:
		x += 1
if sum % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
res = 0
stack = s[0]
s_upd = s
(start_len, end_len) = (0, 1)
while start_len != end_len:
	start_len = len(s_upd)
	for i in range(1, len(s_upd)):
		if len(stack) == 0:
			stack = s_upd[i]
		elif stack[-1] == s_upd[i]:
			stack = stack[:-1]
			res += 1
		else:
			stack += s_upd[i]
	end_len = len(s_upd)
	s_upd = stack
if res % 2 != 0:
	print('Yes')
else:
	print('No')


l = []
s = input()
pairs = 0
for c in s:
	if l == [] or l[len(l) - 1] != c:
		l.append(c)
	else:
		pairs += 1
		l.pop()
print('No' if pairs % 2 == 0 else 'Yes')


(s, c) = ([], 0)
for i in input():
	if s and s[-1] == i:
		s.pop()
		c += 1
	else:
		s.append(i)
print('YES' if c % 2 else 'NO')


i = input()
l = []
p = ''
o = 0
nuz = 0
while o < len(i):
	p = i[o]
	if p >= 'a' and p <= 'z':
		if len(l) == 0 or l[len(l) - 1] != p:
			l.append(p)
		else:
			l.pop()
			nuz += 1
	o += 1
if nuz % 2 == 0:
	print('No')
else:
	print('Yes')


s = input().rstrip()
x = list(s)
I = 0
i = 0
while i < len(x) - 1:
	if x[i] == x[i + 1]:
		del x[i]
		del x[i]
		if i != 0:
			i -= 1
		I += 1
	else:
		i += 1
if I % 2 != 0:
	print('Yes')
else:
	print('No')


st = input()
t = '#'
for c in st:
	t += c
	if c == t[-2]:
		t = t[:-2]
print(['Yes', 'No'][(len(st) - len(t)) // 2 % 2])


string = input()
isFirst = 0
stack = []
index = 0
while index < len(string):
	if len(stack) == 0:
		stack.append(string[index])
	elif string[index] == stack[-1]:
		stack.pop()
		isFirst += 1
	else:
		stack.append(string[index])
	index += 1
if isFirst % 2 == 0:
	print('No')
else:
	print('Yes')


string = list(input())
stack = ['.']
pairs = 0
for i in string:
	if i == stack[-1]:
		pairs += 1
		stack.pop()
	else:
		stack.append(i)
if pairs % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
s2 = []
num = 0
num2 = -1
n = len(s)
i = 0
while i < n:
	if len(s2) > 0 and s2[-1] == s[i]:
		num += 1
		s2.pop()
	else:
		s2 += [s[i]]
	i += 1
num %= 2
print('Yes' * num + 'No' * (1 - num))


a = input()
stack = []
score = 0
for i in range(len(a)):
	if stack != [] and stack[-1] == a[i]:
		stack.pop()
		score += 1
	else:
		stack.append(a[i])
if score % 2 != 0:
	print('Yes')
else:
	print('No')


s = input()
lis = []
cnt = 0
for c in s:
	lis.append(c)
	if len(lis) > 1:
		if lis[-1] == lis[-2]:
			lis.pop()
			lis.pop()
			cnt = cnt + 1
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


def check_winner(msg):
	if len(msg) == 0:
		return 'Yes'
	input = list(msg)
	buffer = []
	turn = 1
	while input != []:
		buffer.append(input.pop())
		while len(buffer) >= 2 and buffer[-1] == buffer[-2]:
			buffer.pop()
			buffer.pop()
			turn += 1
	if turn % 2 == 0:
		return 'Yes'
	else:
		return 'No'
print(check_winner(input()))


S = list(input())
from collections import deque
QUE = deque()
QUE.append('START')
QUE.append('!')
ANS = 0
for s in S:
	QUE.append(s)
	while QUE[-1] == QUE[-2]:
		QUE.pop()
		QUE.pop()
		ANS += 1
if ANS % 2 == 0:
	print('No')
else:
	print('Yes')


import math
import bisect
import itertools
import sys
I = lambda : sys.stdin.readline()
mod = 10 ** 9 + 7

def mindiff(a):
	b = a[:]
	b.sort()
	m = 10000000000
	for i in range(len(b) - 1):
		if b[i + 1] - b[i] < m:
			m = b[i + 1] - b[i]
	return m

def lcm(a, b):
	return a * b // math.gcd(a, b)

def merge(a, b):
	i = 0
	j = 0
	c = 0
	ans = []
	while i < len(a) and j < len(b):
		if a[i] < b[j]:
			ans.append(a[i])
			i += 1
		else:
			ans.append(b[j])
			c += len(a) - i
			j += 1
	ans += a[i:]
	ans += b[j:]
	return (ans, c)

def mergesort(a):
	if len(a) == 1:
		return (a, 0)
	mid = len(a) // 2
	(left, left_inversion) = mergesort(a[:mid])
	(right, right_inversion) = mergesort(a[mid:])
	(m, c) = merge(left, right)
	c += left_inversion + right_inversion
	return (m, c)

def is_prime(num):
	if num == 1:
		return False
	if num == 2:
		return True
	if num == 3:
		return True
	if num % 2 == 0:
		return False
	if num % 3 == 0:
		return False
	t = 5
	a = 2
	while t <= int(math.sqrt(num)):
		if num % t == 0:
			return False
		t += a
		a = 6 - a
	return True

def ceil(a, b):
	if a % b == 0:
		return a // b
	else:
		return a // b + 1

def binsearch(arr, b, low, high):
	if low == high:
		return low
	if arr[math.ceil((low + high) / 2)] < b:
		return binsearch(arr, b, low, math.ceil((low + high) / 2) - 1)
	else:
		return binsearch(arr, b, math.ceil((low + high) / 2), high)

def ncr1(n, r):
	s = 1
	for i in range(min(n - r, r)):
		s *= n - i
		s %= mod
		s *= pow(i + 1, mod - 2, mod)
		s %= mod
	return s

def calc(n, m, r):
	s = 0
	for i in range(0, r + 1, 2):
		s += ncr1(n, i) * ncr1(m, i)
		s %= mod
	return s
st = ['$']
s = input()
c = 0
for i in s:
	if i == st[-1]:
		st.pop()
		c = 1 - c
	else:
		st.append(i)
if c == 1:
	print('YES')
else:
	print('NO')


s = input()
(pilha, count) = ([], 0)
for i in s:
	if len(pilha) == 0:
		pilha.append(i)
	elif i != pilha[-1]:
		pilha.append(i)
	else:
		pilha.pop()
		count += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
a = []
t = 0
a.append(s[0])
for x in range(1, len(s)):
	if len(a) == 0:
		a.append(s[x])
	elif s[x] == a[len(a) - 1]:
		a.pop()
		t += 1
	else:
		a.append(s[x])
if t % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
s1 = list()
for i in range(len(s)):
	s1.append(s[i])
s = s1
i = 0
f = 0
while i < len(s) - 1:
	if s[i] == s[i + 1]:
		s.pop(i + 1)
		s.pop(i)
		if i > 0:
			i = i - 1
		f = (f + 1) % 2
	else:
		i += 1
if f == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = [s[0]]
counter = 0
for i in range(1, len(s)):
	if len(stack) == 0:
		stack.append(s[i])
	elif s[i] == stack[-1]:
		del stack[-1]
		counter += 1
	else:
		stack.append(s[i])
if counter % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = []
if len(s) == 0:
	print('NO')
	exit()
stack.append(s[0])
turns = 0
for i in range(1, len(s)):
	curr = s[i]
	if stack and stack[-1] == curr:
		stack.pop()
		turns += 1
	else:
		stack.append(curr)
if turns % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
a = [s[0]]
k = 0
for i in range(1, len(s)):
	if len(a) == 0:
		a.append(s[i])
	elif len(a) != 0 and s[i] == a[len(a) - 1]:
		k += 1
		a.pop()
	else:
		a.append(s[i])
if k % 2 == 1:
	print('Yes')
else:
	print('No')


from collections import deque
s = input()
counter = 0
q = deque()
q.append('123123123123123')
for i in s:
	last = q.pop()
	if i != last:
		q.append(last)
		q.append(i)
	elif last == i:
		counter += 1
print('Yes' if counter % 2 == 1 else 'No')


A = ['']
x = 0
for ch in input():
	if ch == A[-1]:
		A.pop()
		x += 1
	else:
		A.append(ch)
print('Yes' if x % 2 else 'No')


import collections
s = collections.deque(input())
l = [0]
l.append(s.popleft())
n = 0
while s:
	if l[-1] == s[0]:
		n += 1
		l.pop()
		s.popleft()
	else:
		l.append(s.popleft())
if n % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
n = len(s)
t = [s[0]]
e = 0
for i in range(1, n):
	if len(t) != 0:
		if t[-1] == s[i]:
			e += 1
			t.pop()
		else:
			t.append(s[i])
	else:
		t.append(s[i])
if e % 2 == 0:
	print('NO')
else:
	print('YES')


st = []
t = 1
for x in input():
	if len(st) != 0 and x == st[-1]:
		st.pop()
		t += 1
	else:
		st.append(x)
if t % 2 == 0:
	print('Yes')
else:
	print('No')


def string_problem():
	string = input()
	same_num = 0
	s = []
	for i in range(len(string)):
		if len(s) != 0:
			if string[i] == s[-1]:
				same_num += 1
				s.pop(-1)
			else:
				s.append(string[i])
		else:
			s.append(string[i])
	if same_num % 2 == 0:
		print('No')
	else:
		print('Yes')
	return
string_problem()


import sys
input = sys.stdin.readline
from collections import deque
d = deque()
s = input()
c = 0
for l in s:
	d.append(l)
	if len(d) >= 2 and d[-1] == d[-2]:
		d.pop()
		d.pop()
		c += 1
print('Yes' if c % 2 else 'No')


from collections import deque as dq
s = input()
st = dq(['0'])
c = 0
for i in s:
	if i == st[-1]:
		c += 1
		st.pop()
	else:
		st.append(i)
if c % 2 == 0:
	print('No')
else:
	print('Yes')


st = list()
s = input()
win = False
for c in s:
	if len(st) > 0 and st[-1] == c:
		st.pop()
		win = not win
	else:
		st.append(c)
if win == True:
	print('Yes')
else:
	print('No')


s = input()
l = []
i = len(s)
j = 0
count = 0
z = 0
while i > 0 and j < i:
	l.append(s[j])
	if len(l) > 1:
		a = l.pop()
		b = l.pop()
		if a == b:
			count += 1
			j = j + 1
		elif a != b:
			l.append(b)
			l.append(a)
			j = j + 1
		else:
			j = j + 1
	else:
		j = j + 1
if count % 2 == 0:
	print('No')
elif count % 2 == 1:
	print('Yes')


from sys import stdin, stdout

def solve(word):
	count = 0
	pop_count = 0
	while True:
		(pop_count, word) = pop_duplicates(word)
		count += pop_count
		if pop_count == 0:
			break
	if count % 2 != 0:
		stdout.write('Yes')
	else:
		stdout.write('No')

def solve2(word):
	stack = pop_stacked_duplicates(word)
	if (len(word) - len(stack)) / 2 % 2 != 0:
		stdout.write('Yes')
	else:
		stdout.write('No')

def pop_stacked_duplicates(word):
	stack = []
	i = 1
	stack.append(word[0])
	while i < len(word):
		if len(stack) == 0 or stack[-1] != word[i]:
			stack.append(word[i])
		else:
			stack.pop()
		i += 1
	return stack

def pop_duplicates(word):
	other_word = []
	i = 1
	count_duplicates = 0
	while i < len(word):
		if word[i - 1] != word[i]:
			other_word.append(word[i - 1])
		else:
			count_duplicates += 1
			i += 1
		i += 1
	if i == len(word):
		other_word.append(word[i - 1])
	return (count_duplicates, other_word)
word = list(stdin.readline())
solve2(word)


from sys import stdin
string = stdin.readline().strip()
cnt = 0
st = []
i = 0
while i < len(string):
	if st and st[-1] == string[i]:
		st.pop()
		cnt += 1
	else:
		st.append(string[i])
	i += 1
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
l = len(s)
k = 1
a = [s[0]]
su = 0
for i in range(1, l):
	a.append(' ')
for i in range(1, l):
	a[k] = s[i]
	if a[k - 1] == a[k]:
		k -= 2
		su += 1
	k += 1
if su % 2 == 0:
	print('No')
else:
	print('Yes')


n = input()
stack = [n[0]]
c = 0
i = 1
while i < len(n):
	if len(stack) and n[i] == stack[len(stack) - 1]:
		stack.pop(len(stack) - 1)
		c += 1
	else:
		stack.append(n[i])
	i += 1
if c % 2:
	print('YES')
else:
	print('NO')


a = input()
n = len(a)
b = [0] * n
l = 0
ans = 0
cnt = 0
for x in a:
	if l > 0 and x == b[l - 1]:
		l -= 1
		cnt += 1
	else:
		b[l] = x
		l += 1
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


a = []
s = input()
ans = 0
for i in s:
	a.append(i)
	while len(a) >= 2 and a[-2] == a[-1]:
		a.pop()
		a.pop()
		ans += 1
if ans % 2 == 1:
	print('Yes')
else:
	print('No')


s = input()
st = []
i = 0
fl = 0
while i <= len(s) - 1:
	if st == [] or s[i] != st[-1]:
		st.append(s[i])
	elif s[i] == st[-1]:
		st.pop()
		fl = fl + 1
	i = i + 1
if fl % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
s = list(s)
flag = 0
i = 1
while i != len(s):
	if s[i] == s[i - 1]:
		del s[i]
		del s[i - 1]
		if i > 1:
			i = i - 1
		else:
			i = 1
		flag = flag + 1
	else:
		i = i + 1
	if len(s) == 1 or len(s) == 0:
		break
if flag % 2 == 0:
	print('No')
else:
	print('Yes')


string = input()
pilha = []
cont = 0
for i in string:
	if len(pilha) == 0:
		pilha.append(i)
	elif i == pilha[-1]:
		pilha.pop()
		cont += 1
	else:
		pilha.append(i)
if cont % 2 == 1:
	print('Yes')
else:
	print('No')


s = input()
lg = len(s)
li = []
cn = 0
for i in range(lg):
	if len(li) != 0:
		if s[i] == li[-1]:
			li.pop(-1)
			cn += 1
		else:
			li.append(s[i])
	else:
		li.append(s[i])
if cn % 2 == 1:
	print('Yes')
else:
	print('No')


from collections import deque

def funcao(fila):
	pilha = []
	cont = 0
	while len(fila) > 0:
		prox = fila.popleft()
		if len(pilha) == 0:
			pilha.append(prox)
		else:
			ant = pilha.pop()
			if prox != ant:
				pilha.append(ant)
				pilha.append(prox)
			else:
				cont += 1
	return cont
fila = deque(input())
if funcao(fila) % 2 == 0:
	print('NO')
else:
	print('YES')


import sys
input = sys.stdin.readline
s = input()
a = []
c = 0
for i in s:
	if a:
		if a[-1] == i:
			c += 1
			a.pop()
		else:
			a.append(i)
	else:
		a.append(i)
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
(n, c, w) = (len(s), ['X'], -1)
for p in range(n):
	if s[p] == c[-1]:
		c.pop()
		w *= -1
	else:
		c.append(s[p])
print('YES') if w == 1 else print('NO')


string = input()
lis = []
count = 0
for x in string:
	if len(lis) is 0:
		lis.append(x)
	elif lis[-1] == x:
		lis.pop()
		count += 1
	else:
		lis.append(x)
if count % 2 is 0:
	print('No')
else:
	print('Yes')


a = input()
c = 0
ll = []
for i in range(0, len(a)):
	l = len(ll)
	if l != 0:
		if ll[l - 1] == a[i]:
			ll.pop()
			c += 1
		else:
			ll.append(a[i])
	else:
		ll.append(a[i])
if c % 2 == 0:
	print('no')
else:
	print('yes')


import sys
import math
import collections
import heapq
import decimal
input = sys.stdin.readline
s = input()
stack = []
n = len(s) - 1
c = 0
for i in range(n):
	if stack == []:
		stack.append(s[i])
	elif stack[-1] == s[i]:
		stack.pop()
		c += 1
	else:
		stack.append(s[i])
if c % 2 == 0:
	print('No')
else:
	print('Yes')


n = input()
f = len(n)
stack = [n[0]]
co = 0
k = 1
while k != f:
	if stack != [] and n[k] == stack[-1]:
		co += 1
		stack.pop()
	else:
		stack.append(n[k])
	k += 1
if co % 2 == 0:
	print('NO')
else:
	print('YES')


s = list(input())
t = i = 0
p = len(s) - 1
while i < p:
	if s[i] == s[i + 1]:
		p = p - 2
		s.pop(i)
		s.pop(i)
		t += 1
		if i > 0:
			i -= 1
	else:
		i += 1
if t % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
st = []
p = 0
for i in s:
	if len(st) > 0 and i == st[-1]:
		p = (p + 1) % 2
		st.pop()
	else:
		st.append(i)
if p == 0:
	print('NO')
else:
	print('YES')


str = input()
l = []
count = 0
for i in str:
	if len(l) == 0:
		l.append(i)
	elif l[-1] == i:
		l.pop()
		count += 1
	else:
		l.append(i)
if count % 2 == 1:
	print('YES')
else:
	print('NO')


s = input()
t = '#'
for c in s:
	t += c
	if c == t[-2]:
		t = t[:-2]
print('YNEOS'[(len(s) - len(t)) // 2 % 2::2])


from sys import stdin, stdout
from collections import defaultdict
import math
I = stdin.readline
P = stdout.write
s = I().rstrip()
arr = ['*']
count = 0
for i in range(len(s)):
	if s[i] == arr[-1]:
		count += 1
		arr.pop()
	else:
		arr.append(s[i])
if count % 2 == 0:
	print('No')
else:
	print('Yes')


S = list(input())
i = 1
cnt = 0
while i < len(S) and len(S) >= 2:
	if i != 0 and S[i] == S[i - 1]:
		S.pop(i - 1)
		S.pop(i - 1)
		i -= 2
		cnt += 1
	i += 1
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


def main():
	arr = input()
	if not arr:
		print('Yes')
		return
	player = True
	stack = []
	for ch in arr:
		if stack:
			if stack[-1] == ch:
				stack.pop()
				if player:
					player = False
				else:
					player = True
			else:
				stack.append(ch)
		else:
			stack.append(ch)
	if player:
		print('No')
	else:
		print('Yes')
main()


s = input()
n = len(s)
stack = [s[0]]
count = 0
for i in range(1, n):
	if len(stack) > 0:
		if s[i] == stack[-1]:
			stack.pop()
			count += 1
		else:
			stack.append(s[i])
	else:
		stack.append(s[i])
if count % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
c = 0
st = []

def top(st):
	if len(st) == 0:
		return '0'
	else:
		return st[-1]
for i in s:
	if i == top(st):
		st.pop(-1)
		c = c + 1
	else:
		st.append(i)
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = list(input())
c = 0
i = 0
ans = 0
x = -1
a = []
for i in range(len(s)):
	a.append(s[i])
	x += 1
	if x >= 1 and a[x] == a[x - 1]:
		ans += 1
		a.pop(x)
		a.pop(x - 1)
		x -= 2
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


x = list(input())
a = [x[0]]
ans = 0
for i in range(1, len(x)):
	try:
		if x[i] != a[-1]:
			a.append(x[i])
		else:
			del a[-1]
			ans += 1
	except IndexError:
		a.append(x[i])
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
s1 = list(s)
k = []
t = 0
for j in range(len(s1)):
	if len(k) == 0:
		k.append(s[j])
	elif s1[j] == k[-1]:
		k.pop()
		t += 1
	else:
		k.append(s1[j])
if t % 2 == 0:
	print('NO')
else:
	print('YES')


stInp = input()
charser = ['']
p = 0
for j in stInp:
	if j == charser[-1]:
		p += 1
		charser.pop()
	else:
		charser.append(j)
if p % 2 == 1:
	print('Yes')
else:
	print('No')


import sys
input = sys.stdin.readline
from math import log2, log, ceil

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def nCr(n, k):
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return res

def upper_bound(a, x, lo=0):
	hi = len(a)
	while lo < hi:
		mid = (lo + hi) // 2
		if a[mid] < x:
			lo = mid + 1
		else:
			hi = mid
	return lo

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
string = input().strip()
arr = []
count = 0
n = len(string)
if n == 1:
	print('No')
	exit()
for i in range(n):
	if len(arr) == 0:
		arr.append(string[i])
	elif arr[-1] == string[i]:
		count += 1
		arr.pop()
	else:
		arr.append(string[i])
if count % 2 == 1:
	print('Yes')
else:
	print('No')


s = '^' + input() + '$'
n = len(s)
N = [*list(range(1, n + 1))]
P = [*list(range(-1, n - 1))]
count = 0
i = 0
while N[i] != n:
	if s[i] == s[N[i]]:
		P[N[N[i]]] = P[i]
		N[P[i]] = N[N[i]]
		i = P[i]
		count += 1
	else:
		i = N[i]
print('Yes' if count % 2 else 'No')


s = input()
count = 0
temp = []
for item in s:
	if temp and item == temp[-1]:
		temp.pop()
		count += 1
	else:
		temp.append(item)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
n = int(len(s))
a = []
ans = 0
i = 0
while i < n - 1:
	if s[i] == s[i + 1]:
		ans += 1
		i = i + 2
		j = 0
		while a and i < n and (a[-1] == s[i]):
			ans += 1
			a.pop()
			i += 1
	else:
		a.append(s[i])
		i += 1
if ans % 2:
	print('Yes')
else:
	print('No')


string = input()
stack = []
turn = True
for s in list(string):
	if len(stack) == 0:
		stack.append(s)
	elif stack[-1] == s:
		stack.pop(-1)
		turn = not turn
	else:
		stack.append(s)
if turn:
	print('No')
else:
	print('Yes')


letras = input()
pilha = ['']
aux = 0
for i in range(len(letras)):
	if pilha[-1] == letras[i]:
		pilha.pop()
		aux += 1
	else:
		pilha.append(letras[i])
if aux % 2 != 0:
	print('Yes')
else:
	print('No')


st = input()

def peek(s):
	if not s:
		return -1
	else:
		return s[-1]
stack = []
count = 0
for letter in st:
	if peek(stack) == letter:
		stack.pop()
		count += 1
	else:
		stack.append(letter)
if count % 2:
	print('Yes')
else:
	print('No')


t = input()
s = []
cnt = 0
for idx in range(len(t)):
	if s:
		top = s[-1]
		if top == t[idx]:
			s.pop()
			cnt += 1
		else:
			s.append(t[idx])
	else:
		s.append(t[idx])
print('No' if cnt % 2 == 0 else 'Yes')


class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()
s = input()
ans = 0
for i in range(len(s)):
	if not arrStack.isEmpty():
		if arrStack.my_peak() == s[i]:
			ans += 1
			arrStack.my_pop()
		else:
			arrStack.my_push(s[i])
	else:
		arrStack.my_push(s[i])
if ans % 2:
	print('Yes')
else:
	print('No')


def main():
	count = 2
	s = input()
	stack = []
	for i in s:
		if not stack:
			stack.append(i)
		elif stack[-1] == i:
			stack.pop()
			count += 1
		else:
			stack.append(i)
	if count % 2 == 0:
		print('No')
	else:
		print('Yes')
main()


s = input()
st = ['']
k = 0
for c in s:
	if c == st[-1]:
		k += 1
		st.pop()
	else:
		st.append(c)
print('Yes' if k % 2 == 1 else 'No')


s = input()
arr = []
for i in s:
	arr.append(i)
f = 0
for i in range(1, len(s)):
	if s[i] == s[i - 1]:
		f = 1
		break
if f == 0:
	print('No')
	exit()
sx = set()
for i in s:
	sx.add(i)
if len(sx) == 1:
	if len(s) % 2 == 0:
		tt = len(s) // 2
		if tt % 2 == 1:
			print('Yes')
			exit()
		else:
			print('No')
			exit()
	else:
		tt = len(s) // 2
		if tt % 2 == 1:
			print('Yes')
			exit()
		else:
			print('No')
			exit()
pairs = 0
stack = []
for i in range(len(s)):
	if len(stack) == 0:
		stack.append(s[i])
		continue
	elif s[i] == stack[-1]:
		pairs += 1
		stack.pop()
	else:
		stack.append(s[i])
rt = len(s) - pairs * 2
if rt < 2 and rt > 0:
	if pairs % 2 == 1:
		print('Yes')
		exit()
	else:
		print('No')
		exit()
if rt == 0:
	if pairs % 2 == 0:
		print('No')
		exit()
	else:
		print('Yes')
		exit()
re = s[::-1]
if re == s:
	if len(s) % 2 == 0:
		tt = len(s) // 2
		if tt % 2 == 1:
			print('Yes')
			exit()
		else:
			print('No')
			exit()
	elif pairs % 2 == 0:
		print('No')
		exit()
	else:
		print('Yes')
		exit()
if pairs % 2 == 0:
	print('No')
	exit()
else:
	print('Yes')
	exit()


s = input()
stack = []
l = ''
t = 0
for x in s:
	if x == l:
		t += 1
		stack.pop(-1)
		if len(stack) > 0:
			l = stack[-1]
		else:
			l = ''
	else:
		stack.append(x)
		l = x
if t % 2 == 0:
	print('No')
else:
	print('Yes')


S = list(input())
count = 0
R = []
for i in range(len(S)):
	if len(R) == 0:
		R.append(S[i])
	elif S[i] == R[-1]:
		R.pop()
		count += 1
	else:
		R.append(S[i])
if count == 0 or count % 2 == 0:
	print('NO')
else:
	print('Yes')


def solve():
	s = input()
	n = len(s)
	st = []
	st.append(s[0])
	count = 0
	for i in range(1, n):
		st.append(s[i])
		if len(st) >= 2 and st[-1] == st[-2]:
			st.pop()
			st.pop()
			count += 1
	if count % 2 == 0:
		print('NO')
	else:
		print('YES')
	return 0
solve()


win = False
t = []
s = input()
for a in s:
	if len(t) >= 1 and a == t[-1]:
		t.pop()
		if win:
			win = False
		else:
			win = True
		continue
	t.append(a)
if win:
	print('Yes')
else:
	print('No')


n = list(input())
t = i = 0
p = len(n) - 1
while i < p:
	if n[i] == n[i + 1]:
		p = p - 2
		n.pop(i)
		n.pop(i)
		t = t + 1
		if i > 0:
			i = i - 1
	else:
		i = i + 1
if t % 2 == 0:
	print('NO')
else:
	print('YES')


arr = list(input())
(stack, count) = ([], 0)
for i in range(len(arr)):
	if len(stack) != 0:
		k = stack.pop()
		if k == arr[i]:
			count += 1
		else:
			stack.append(k)
			stack.append(arr[i])
	else:
		stack.append(arr[i])
if count % 2:
	print('Yes')
else:
	print('No')


inp = input()
if len(inp) == 1:
	exit(print('No'))
s = []
s.extend(inp)
l = 0
r = 1
player = 1
lenth = len(s)
zero = False
while r < lenth:
	if s[l] == s[r]:
		if player == 1:
			player = 2
		else:
			player = 1
		del s[r]
		del s[l]
		lenth = len(s)
		if l != 0:
			l -= 1
			r -= 1
	else:
		l += 1
		r += 1
if player == 1:
	print('No')
else:
	print('Yes')


s = input()
plays = 0
stack = []
for letter in s:
	if stack and stack[-1] == letter:
		stack.pop()
		plays += 1
	else:
		stack.append(letter)
if plays % 2 == 0:
	print('No')
else:
	print('Yes')


string = str(input())
stack = []
winner = 1
for i in string:
	if len(stack) == 0 or stack[-1] != i:
		stack.append(i)
	else:
		stack.pop(-1)
		winner = 1 - winner
result = 'No'
if winner == 0:
	result = 'Yes'
print(result)


(z, zz) = (input, lambda : list(map(int, z().split())))
fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = 1
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)

def output(answer):
	stdout.write(str(answer) + '\n')
arr = fast()
n = len(arr)
ans = 0
que = deque()
que.append(arr[0])
l = 1
for i in range(1, n):
	x = arr[i]
	if l >= 1 and x == que[-1]:
		ans += 1
		que.pop()
		l -= 1
	else:
		que.append(x)
		l += 1
if ans % 2 == 1:
	print('Yes')
else:
	print('No')


a = input()
b = []
ans = 0
for i in a:
	if b and i == b[-1]:
		b.pop()
		ans += 1
	else:
		b.append(i)
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
n = len(s)
(stack, top) = ([s[0]] * n, 0)
num = 0
for i in range(1, n):
	if top >= 0 and s[i] == stack[top]:
		num += 1
		top -= 1
		continue
	top += 1
	stack[top] = s[i]
if num % 2 == 0:
	print('No')
else:
	print('Yes')


s = list(input())
cnt = 0
i = 0
while i < len(s) - 1:
	if s[i] == s[i + 1]:
		s.pop(i)
		s.pop(i)
		cnt += 1
		i -= 1
		i = max(i, 0)
	else:
		i += 1
if cnt % 2 == 0 and cnt != 1:
	print('No')
else:
	print('Yes')


s = input()
st = [-1]
count = 0
for x in s:
	if st[-1] == x:
		st.pop()
		count += 1
	else:
		st.append(x)
if count % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
l = [0]
for c in s:
	l += (c,)
	if c == l[-2]:
		l[-2:] = []
print('YNEOS'[(len(s) - len(l)) // 2 % 2::2])


p = [0]
l = input()
temp = 0
s = 0
for i in l:
	if p[temp] == i:
		p.pop()
		s += 1
		temp -= 1
	else:
		p.append(i)
		temp += 1
if s % 2 == 0:
	print('NO')
else:
	print('YES')


z = [-1] * 26
s = 0
k = input().replace('', ' ').split()
j = len(k)
i = 0
while i < j and j != 0:
	if z[ord(k[i]) - 97] == -1:
		z[-97 + ord(k[i])] = i
		i += 1
	elif i - z[-97 + ord(k[i])] == 1:
		s += 1
		r = k[i]
		k.pop(i)
		k.pop(z[-97 + ord(r)])
		z[-97 + ord(r)] = -1
		j -= 2
		i -= 2
	else:
		z[-97 + ord(k[i])] = i
		i += 1
print('NYoe s'[s % 2::2])


s = input()
s = list(s)
n = len(s)
ct = 0
prev = -1
for i in range(0, n):
	if i != n - 1 and s[i] == s[i + 1] and (s[i] != -1):
		ct += 1
		s[i] = -1
		s[i + 1] = -1
	elif s[i] == -1:
		continue
	elif prev == -1:
		prev = i
	elif s[prev] == s[i]:
		s[prev] = -1
		s[i] = -1
		ct += 1
		r = prev
		for j in range(prev - 1, -1, -1):
			if s[j] != -1:
				prev = j
				break
		if prev == r:
			prev = -1
	else:
		prev = i
if ct % 2 != 0:
	print('Yes')
else:
	print('No')


n = input()
s = ''
m = 0
s += n[0]
for i in range(len(n) - 1):
	if len(s) > 0:
		if n[i + 1] == s[-1]:
			s = s[:len(s) - 1]
			m += 1
		else:
			s += n[i + 1]
	else:
		s += n[i + 1]
if m % 2 == 1:
	print('Yes')
else:
	print('No')


s = input()
s1 = []
for i in s:
	if s1 and s1[-1] == i:
		s1.pop()
	else:
		s1.append(i)
		pre = i
ans = (len(s) - len(s1)) // 2
print(('No', 'Yes')[ans % 2])


s = list(input())
n = len(s)
moves = 0
stack = [s[0]]
S = 1
for i in range(1, n):
	if S > 0 and s[i] == stack[-1]:
		stack.pop()
		moves += 1
		S -= 1
	else:
		stack.append(s[i])
		S += 1
print('YES') if moves % 2 != 0 else print('NO')


s = input()
count = 0
l = len(s)
i = 1
while i >= 1 and i < l:
	if len(s) == 1:
		break
	if s[i] == s[i - 1]:
		count += 1
		s = s[0:i - 1] + s[i + 1:]
		if i <= 2:
			i = 1
		else:
			i = i - 2
		l = l - 2
	else:
		i += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = []
c = 0
for e in s:
	if len(stack) == 0 or stack[-1] != e:
		stack.append(e)
	else:
		stack.pop()
		c += 1
print('NO' if c % 2 == 0 else 'YES')


from itertools import combinations
from sys import stdin
import math
MOD = 10 ** 9 + 7

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())
s = input()
n = len(s)
di = {}
li = []
cnt = 0
for i in range(n):
	if len(li) != 0:
		if s[i] == li[-1]:
			li.pop()
			cnt += 1
		else:
			li.append(s[i])
	else:
		li.append(s[i])
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
pairs = 0
if len(set(s)) == len(s):
	print('No')
	exit()
stack = []
turn = False
for c in s:
	if stack:
		if stack[-1] == c:
			stack.pop()
			turn = not turn
		else:
			stack.append(c)
	else:
		stack.append(c)
if turn:
	print('Yes')
else:
	print('No')


import sys
s = sys.stdin.readline().strip()
l = len(s)
A = []
x = 0
y = 0
for i in range(0, l):
	if s[i] == y:
		A.pop()
		x = x + 1
		if 2 * x == i + 1:
			y = 0
		else:
			y = A[-1]
	else:
		A.append(s[i])
		y = s[i]
if x % 2 == 1:
	print('Yes')
else:
	print('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')
s = list(input())
j = 0
f = 1
while j < len(s) - 1:
	if s[j] == s[j + 1]:
		s.pop(j)
		s.pop(j)
		j -= 2
		if j == -2:
			j += 1
		if f == 1:
			f = 2
		elif f == 2:
			f = 1
	j += 1
if f == 1:
	print('No')
else:
	print('Yes')


s = input()
v = []
top = -1
ans = 0
for i in range(len(s)):
	if v == []:
		top += 1
		v.append(s[i])
	elif s[i] == v[top]:
		v.pop(top)
		ans += 1
		top -= 1
	else:
		v.append(s[i])
		top += 1
if ans % 2 == 0:
	print('NO')
else:
	print('YES')


st = input()
re = []
re.append(st[0])
cnt = 0
for i in range(1, len(st)):
	if len(re) == 0:
		re.append(st[i])
	else:
		res = re[-1]
		if st[i] == res[0]:
			cnt += 1
			re.pop()
		else:
			re.append(st[i])
if cnt % 2 == 0:
	print('No')
else:
	print('Yes')


from collections import deque
a = input()
z = deque([a[0]])
i = 1
count = 0
while i < len(a):
	z.append(a[i])
	if len(z) >= 2:
		if z[-1] == z[-2]:
			z.pop()
			z.pop()
			count += 1
	i += 1
if count % 2:
	print('Yes')
else:
	print('No')


def solve(s):
	arr = []
	ans = 0
	for i in range(len(s)):
		arr.append(s[i])
		if len(arr) > 1 and arr[-2] == arr[-1]:
			ans += 1
			arr.pop(-1)
			arr.pop(-1)
	print('No' if ans % 2 == 0 else 'Yes')

def main():
	s = input()
	solve(s)
main()


import sys
import math
input = sys.stdin.readline
s = input()
stack = []
t = 0
for i in range(len(s)):
	if len(stack) > 0 and s[i] == stack[-1]:
		stack.pop()
		t += 1
	else:
		stack.append(s[i])
if t % 2 == 0:
	print('No')
else:
	print('Yes')


def play1(s):
	i = 0
	c = []
	while True:
		try:
			if s[i] == s[i + 1]:
				c.append(i)
				del s[i]
				del s[i]
				if i != 0:
					i -= 1
			else:
				i += 1
		except:
			break
	return c
s = list(input())
p = play1(s)
if len(p) == 0 or len(p) % 2 == 0:
	print('No')
else:
	print('Yes')


def summ(s):
	s += '0'
	sum = 0
	ans = ''
	key = ''
	for i in s:
		if key == '':
			key = i
		elif key == i:
			key = ''
			sum += 1
		else:
			if ans == '':
				ans += key
			elif ans[-1] != key:
				ans += key
			else:
				ans = ans[:len(ans) - 1]
				sum += 1
			key = i
	return sum
s = input()
if summ(s) % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
rec = ['#']
num = 0
N = len(s)
for i in range(N):
	if s[i] == rec[-1]:
		num += 1
		rec.pop(-1)
	else:
		rec.append(s[i])
if num % 2 == 1:
	print('Yes')
else:
	print('No')


def main():
	s = input()
	stack = [s[0]]
	moves = 0
	for i in range(1, len(s)):
		if stack and s[i] == stack[-1]:
			moves += 1
			stack.pop()
		else:
			stack.append(s[i])
	if moves % 2 == 0:
		print('No')
	else:
		print('Yes')
main()


stack = ['#']
word = input()
result = 0
for i in range(0, len(word)):
	ch = word[i]
	if stack[len(stack) - 1] == ch:
		stack.pop()
		result = 1 - result
	else:
		stack.append(ch)
if result == 1:
	print('Yes')
else:
	print('No')


S = input()
List = []
for i in S:
	List.append(i)
if len(List) == 1:
	print('No')
else:
	first = 0
	second = 1
	count = 0
	while second < len(List):
		if List[first] == List[second]:
			del List[first]
			del List[first]
			count += 1
			if first != 0:
				first -= 1
				second = first + 1
		else:
			first += 1
			second += 1
	if count & 1:
		print('Yes')
	else:
		print('No')


from collections import deque
stack = deque()
s = input()
winner = 0
for i in range(len(s)):
	if not stack:
		stack.append(s[i])
	elif stack[-1] == s[i]:
		stack.pop()
		winner = 1 - winner
	else:
		stack.append(s[i])
if winner == 1:
	print('Yes')
else:
	print('No')


s = input()
l = []
c = 0
for i in range(len(s)):
	if not l:
		l.append(s[i])
	elif l[-1] == s[i]:
		c = c + 1
		l.pop(-1)
	else:
		l.append(s[i])
if c % 2:
	print('YES')
else:
	print('NO')


s = input()
st = []
k = 0
for i in range(len(s)):
	if len(st) == 0 or st[-1] != s[i]:
		st.append(s[i])
	else:
		st.pop()
		k += 1
print(['No', 'Yes'][k % 2])


in_string = input()
count = 0
str_len = len(in_string)
ll = [-1] * str_len
prev = 0
for i in range(1, str_len):
	if prev < str_len and i < str_len and (ll[prev] == -1) and (ll[i] == -1) and (in_string[prev] == in_string[i]):
		count += 1
		if prev > 0:
			if ll[prev - 1] > 0:
				ll[prev] = ll[i] = ll[prev - 1]
			else:
				ll[prev] = ll[i] = prev
		else:
			ll[prev] = ll[i] = 0
		if ll[prev] - 1 >= 0 and i < str_len - 1 and (in_string[ll[prev] - 1] == in_string[i + 1]):
			prev = ll[prev] - 1
			i -= 1
		else:
			prev = i
		i += 1
	else:
		prev = i
if count % 2 == 0:
	print('NO')
else:
	print('YES')


s = input()
szo = []
szam = 0
for i in range(len(s)):
	if len(szo) == 0:
		szo.append(s[i])
	elif s[i] == szo[len(szo) - 1]:
		szo.pop(len(szo) - 1)
		szam += 1
	else:
		szo.append(s[i])
if szam % 2 == 0:
	print('NO')
else:
	print('YES')


s = []
a = 0
for ch in input():
	if len(s) and s[-1] == ch:
		s.pop()
		a += 1
	else:
		s.append(ch)
print('Yes' if a & 1 else 'No')


s = input()
li = []
flag = 0
i = 0
while i < len(s):
	if len(li) == 0:
		li.append(s[i])
	elif s[i] == li[len(li) - 1]:
		if flag == 0:
			flag = 1
		else:
			flag = 0
		li.pop()
	else:
		li.append(s[i])
	i = i + 1
if flag == 0:
	print('No')
else:
	print('Yes')


a = input()
s = list(a)
i = s[0]
a1 = 0
flag = 0
ind = 0
while 1 == 1:
	for j in range(ind, len(s) - 1):
		if s[j] == s[j + 1]:
			if j > 0:
				ind = j - 1
			del s[j]
			del s[j]
			a1 = a1 + 1
			break
		if j >= len(s) - 2:
			flag = 1
			break
	if len(s) <= 1 or ind >= len(s) - 1:
		flag = 1
	if flag == 1:
		break
if a1 % 2 == 0:
	print('No')
else:
	print('Yes')


from collections import deque
s = input()
stack = deque()
stack.appendleft(s[0])
winner_count = 0
for i in range(1, len(s)):
	if len(stack) > 0 and s[i] == stack[0]:
		stack.popleft()
		winner_count += 1
	else:
		stack.appendleft(s[i])
if winner_count % 2 == 1:
	print('YES')
else:
	print('NO')


(n, c) = (input(), 0)
stack = []
for i in n:
	try:
		if i == stack[-1]:
			stack.pop(-1)
			c += 1
		else:
			stack.append(i)
	except:
		stack.append(i)
if c % 2:
	print('YES')
else:
	print('NO')


import re, math, decimal, bisect

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return [int(_) for _ in input().strip().split()]
s = list(read())
i = 0
last = 0
n = len(s)
stk = []
turn = False
while i < n:
	if len(stk) == 0 or stk[-1] != s[i]:
		stk.append(s[i])
	else:
		stk.pop(-1)
		turn = not turn
	i += 1
print('Yes' if turn else 'No')


s = input()
f = True
k = 0
while f:
	f = False
	i = 1
	while 0 < i < len(s):
		if s[i] == s[i - 1]:
			k += 1
			f = True
			s = s[:i - 1] + s[i + 1:]
			i = max(1, i - 1)
		else:
			i += 1
if k % 2 == 0:
	print('No')
else:
	print('Yes')


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	s = S()
	l = len(s)
	a = collections.deque()
	r = 0
	al = 0
	for i in range(l):
		t = s[i]
		if al > 0 and a[-1] == t:
			r += 1
			a.pop()
			al -= 1
		else:
			a.append(t)
			al += 1
	if r % 2 == 0:
		return 'No'
	return 'Yes'
print(main())


x = input()
stack = ['#']
ndel = 0
for i in range(len(x)):
	if x[i] == stack[-1]:
		ndel += 1
		stack.pop()
	else:
		stack.append(x[i])
if ndel % 2 == 0:
	print('No')
else:
	print('Yes')


pairs = 0
s = input()
stack = []
for i in s:
	if len(stack) and stack[-1] == i:
		stack.pop()
		pairs += 1
	else:
		stack.append(i)
print('Yes' if pairs & 1 else 'No')


def top(stack):
	if stack == []:
		return False
	return stack[-1]
word = list(input())
stack = []
moves = 0
while len(word) > 0:
	if top(word) == top(stack):
		word.pop()
		stack.pop()
		moves += 1
	else:
		stack.append(word.pop())
if moves % 2 == 0:
	print('No')
else:
	print('Yes')


string = input()
count = 0
stack = []
for char in string:
	if len(stack) == 0:
		stack.append(char)
		continue
	if stack[-1] == char:
		stack.pop()
		count += 1
	else:
		stack.append(char)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


stack = []
s = input()
amount = 0
for i in s:
	if len(stack) != 0 and i == stack[-1]:
		stack.pop()
		amount += 1
	else:
		stack.append(i)
if amount % 2 == 1:
	print('YES')
else:
	print('NO')


s = input()
seq = []
cont = 0
p = [s[0]]
for j in range(1, len(s)):
	seq.append(s[j])
for i in range(len(seq)):
	if len(p) > 0:
		if seq[i] == p[-1]:
			cont += 1
			p.pop(-1)
		else:
			p.append(seq[i])
	else:
		p.append(seq[i])
if cont % 2 != 0:
	print('Yes')
else:
	print('No')


val = input()
stack = []
turns = 1
for c in val:
	if stack and stack[-1] == c:
		turns += 1
		stack.pop()
	else:
		stack.append(c)
print('Yes' if turns % 2 == 0 else 'No')


st = []
s = str(input())
cnt = 1
for i in range(len(s)):
	if len(st) != 0 and st[-1] == s[i]:
		st.pop()
		cnt = 3 - cnt
	else:
		st.append(s[i])
if cnt == 1:
	print('No')
else:
	print('Yes')


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')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x
for t in range(1):
	string = input()
	cnt_gp = 0
	li = [0]
	for i in string:
		if li[-1] == i:
			li.pop()
			cnt_gp += 1
		else:
			li.append(i)
	if cnt_gp % 2 == 0:
		print('No')
	else:
		print('Yes')


letters = input()
stack = []
first = False
for l in letters:
	stack.append(l)
	while len(stack) >= 2 and stack[-1] == stack[-2]:
		stack.pop()
		stack.pop()
		first = not first
if first:
	print('Yes')
else:
	print('No')


h = [str(i) for i in input()]
player = 1
flag = True
o = 1
while flag:
	flag = False
	for i in range(o, len(h)):
		if h[i] == h[i - 1]:
			flag = True
			player += 1
			player %= 2
			del h[i - 1]
			del h[i - 1]
			if i != 1:
				o = i - 1
			else:
				o = i
			break
if player == 1:
	print('NO')
else:
	print('YES')


s = list(input())
count = 0
stack = []
for i in s:
	if stack != [] and i == stack[-1]:
		count += 1
		stack.pop()
	else:
		stack.append(i)
if count % 2 == 0:
	print('NO')
else:
	print('YES')


entrada = input()
pilha = []
rodadas = 0
for i in entrada:
	if len(pilha) == 0:
		pilha.append(i)
	elif i == pilha[len(pilha) - 1]:
		rodadas += 1
		pilha.pop(len(pilha) - 1)
	else:
		pilha.append(i)
if rodadas % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
c = 0
r = [s[0]]
for x in range(len(s) - 1):
	if len(r) > 0 and s[x + 1] == r[len(r) - 1]:
		c += 1
		r.pop()
	else:
		r.append(s[x + 1])
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
one = 0
stack = []
for i in s:
	if len(stack) == 0 or stack[-1] != i:
		stack.append(i)
	else:
		stack.pop()
		if one == 0:
			one = 1
		else:
			one = 0
if not one:
	print('No')
else:
	print('Yes')


l = []
cnt = 0
for ch in input():
	if len(l) and ch == l[-1]:
		l.pop()
		cnt += 1
	else:
		l.append(ch)
print('Yes' if cnt & 1 else 'No')


s = input()
a = [char for char in s]
count = 0
i = 0
while i < len(a) - 1:
	if a[i] == a[i + 1]:
		count += 1
		a.pop(i)
		a.pop(i)
		if i > 0:
			i -= 1
	else:
		i += 1
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = list(input())
z = True
i = 0
ans = 0
while i < len(s) - 1 and z:
	if s[i] == s[i + 1]:
		ans += 1
		s.pop(i + 1)
		s.pop(i)
		if i == 0:
			i = i
		elif i >= len(s):
			z = False
		elif s[i - 1] == s[i]:
			i = i - 1
		else:
			i = i
	else:
		i += 1
if ans % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
t = list()
count = 0
for ch in s:
	if len(t) != 0 and ch == t[-1]:
		t.pop()
		count += 1
	else:
		t.append(ch)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


class Pilha(object):

	def __init__(self):
		self.dados = []

	def empilha(self, elemento):
		self.dados.append(elemento)

	def desempilha(self):
		if not self.vazia():
			return self.dados.pop(-1)

	def vazia(self):
		return len(self.dados) == 0

	def topoPilha(self):
		if not self.vazia():
			return self.dados[-1]
s = input()
p = Pilha()
v = -1
for i in s:
	if p.vazia() == False and i == p.topoPilha():
		p.desempilha()
		v *= -1
	else:
		p.empilha(i)
if v == -1:
	print('No')
else:
	print('Yes')


a = input()
s = []
c = 0
for i in a:
	if s and s[-1] == i:
		s.pop()
		c += 1
	else:
		s.append(i)
if c & 1:
	print('Yes')
else:
	print('No')


s = input()
res = ['']
cnt = 0
for i in s:
	if i == res[-1]:
		res.pop()
		cnt += 1
	else:
		res.append(i)
print('Yes' if cnt % 2 == 1 else 'No')


s = input()
l = list(s)
i = 0
c = len(l)
count = 0
while i < c - 1:
	if l[i] == l[i + 1]:
		del l[i]
		del l[i]
		c -= 2
		i -= 1 + (i != 0)
		count += 1
	i += 1
if count % 2:
	print('Yes')
else:
	print('No')


import os.path
import sys
from math import floor, gcd, fabs, factorial, fmod, sqrt, inf, log
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

def inp():
	return sys.stdin.readline().strip()
s = inp()
l = len(s)
ans = 0
ml = []
for i in range(l):
	if ml and s[i] == ml[-1]:
		ml.pop()
		ans += 1
	else:
		ml.append(s[i])
print('Yes' if ans % 2 else 'No')


n = str(input())
Stack = []
res = 0
for i in range(0, len(n)):
	if len(Stack) == 0:
		Stack.append(n[i])
	elif n[i] == Stack[len(Stack) - 1]:
		Stack.pop()
		res = 1 - res
	else:
		Stack.append(n[i])
if res == 0:
	print('No')
else:
	print('Yes')


s = input()
s1 = list(s)
count = 0
l = [9]
for i in s1:
	if i == l[-1]:
		l.pop()
		count = count + 1
	else:
		l.append(i)
if count % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
win = False
chars = list(s)
l = len(chars)
i = 0
while i < l:
	while i < l - 1 and chars[i] != chars[i + 1]:
		i += 1
	if i >= l - 1:
		break
	chars.pop(i)
	chars.pop(i)
	l -= 2
	win = not win
	if i > 0:
		i -= 1
if win:
	print('Yes')
else:
	print('No')


import math
import sys

def main():
	s = input()
	stack = []
	ans = 0
	for i in s:
		if len(stack) != 0 and stack[-1] == i:
			stack.pop()
			ans += 1
		else:
			stack.append(i)
	print('No' if ans % 2 == 0 else 'Yes')
main()


s = list(input())
i = 0
c = 0
while i + 1 < len(s):
	if s[i] == s[i + 1]:
		c += 1
		s.pop(i)
		s.pop(i)
		if i > 0:
			i -= 1
	else:
		i = i + 1
if c % 2 == 0:
	print('No')
else:
	print('Yes')


s = input()
stack = [None]
res = 0
for i in s:
	if i == stack[-1]:
		stack.pop()
		res += 1
	else:
		stack.append(i)
print('Yes' if res % 2 else 'No')


jogo = list(input())
i = 0
ganhou = False
while i < len(jogo) - 1:
	if jogo[i] == jogo[i + 1]:
		del jogo[i:i + 2]
		i -= 1
		if ganhou == False:
			ganhou = True
		else:
			ganhou = False
		if i == -1:
			i = 0
	else:
		i += 1
	if len(jogo) == 1:
		break
if ganhou:
	print('Yes')
else:
	print('No')


s = str(input())
n = len(s)
ans = 0
stack = [s[0]]
for i in range(1, n):
	if stack and stack[-1] == s[i]:
		stack.pop()
		ans += 1
	else:
		stack.append(s[i])
if ans & 1:
	print('Yes')
else:
	print('No')


(z, zz) = (input, lambda : list(map(int, z().split())))
fast = lambda : stdin.readline().strip()
zzz = lambda : [int(i) for i in fast().split()]
(szz, graph, mod, szzz) = (lambda : sorted(zz()), {}, 10 ** 9 + 7, lambda : sorted(zzz()))
from string import *
from re import *
from collections import *
from queue import *
from sys import *
from collections import *
from math import *
from heapq import *
from itertools import *
from bisect import *
from collections import Counter as cc
from math import factorial as f
from bisect import bisect as bs
from bisect import bisect_left as bsl
from itertools import accumulate as ac

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)

def prime(x):
	p = ceil(x ** 0.5) + 1
	for i in range(2, p):
		if x % i == 0 and x != 2 or x == 0:
			return 0
	return 1

def dfs(u, visit, graph):
	visit[u] = 1
	for i in graph[u]:
		if not visit[i]:
			dfs(i, visit, graph)
lst = []
c = 0
for i in fast():
	if lst and i == lst[-1]:
		lst.pop()
		c += 1
	else:
		lst.append(i)
print(['No', 'Yes'][c % 2])


s = input()
ct = 0
i = 0
stk = []
while i < len(s):
	if len(stk) != 0 and stk[-1] == s[i]:
		ct += 1
		stk.pop()
	else:
		stk.append(s[i])
	i += 1
if ct % 2 == 1:
	print('Yes')
else:
	print('No')


s = input()
l = []
c = 0
for x in s:
	if not l:
		l.append(x)
	elif l[-1] == x:
		l.pop()
		c += 1
	else:
		l.append(x)
print('Yes') if c & 1 else print('No')