module Station
  sub Main(ByVal args() as String)
	dim a,b as integer    
    dim arr as string
	arr=Console.ReadLine()
    b=0
for a = 0 to 2
    if arr(a)="A"c then
    b=b+1
    else
    b=b+2
end if
next

if b mod 3 = 0 then
Console.WriteLine("No")
else
Console.WriteLine("Yes")
end if
end sub
end module