Uses
CRT;
Var
n,i,j:longint;
s:string;
t:boolean;
begin
ClrScr;
repeat
readln(n);
until n<=10000;
if ((n<=0) and (n<=-10)) xor (n<10) then
writeln(' ÷èñëå îäíà öèôðà')
else
begin
str(n,s);
t:=true;
for i:=1 to length(s) do
begin
if (s[i]=s[i+1]) or (s[i]=s[i+2])
or (s[i]=s[i+3]) or (s[i]=s[i+4]) then
begin
t:=false;
end;
end;
if t then writeln('âñå öèôðû ðàçíûå')
else
writeln('Íå âñå ðàçíûå');
end;
readln;
end.