program Rev6_5;
var
i, j, t: Integer;
begin
i := 0;
repeat
t := 0;
j := i;
while j <> 0 do
begin
t := t * 10 + j mod 10;
j := j div 10;
end;
if (6 * i = 5 * t) then Writeln(i);
Inc(i);
until i = 0;
end.
program Rev6_5;
var
i, j: Integer;
t: LongInt;
begin
i := 0;
repeat
t := 0;
j := i;
while j <> 0 do
begin
t := t * 10 + j mod 10;
j := j div 10;
end;
if 6 * LongInt(i) = 5 * t then Writeln(i);
Inc(i);
until i = 0;
Writeln;
end.