program Numbers;
uses crt;
var
str: string;
function IsExist(s: string): boolean;
var
i: integer;
flag: boolean;
begin
i := 1;
flag := false;
while (i <= length(str)) do
begin
if (str[i] = str[i + 1]) then
flag := true;
inc(i);
end;
IsExist := flag;
end;
Begin
write('Enter the string: ');
readln(str);
if (IsExist(str)) then
writeln('Yes')
else
writeln('No');
End.