Program Zadacha;
var
a, b: integer;
min, max: integer;
p: integer;
i: integer;
Begin
Write('Enter a, b ');
ReadLn(a, b);
if (a < b) then
begin
min := a;
max := b;
end
else
begin
min := b;
max := a;
end;
p := 1;
for i := min to max do
p := p * i;
WriteLn(p);
ReadLn;
End.