var
a, b, c, a1, b1:integer;
begin
Writeln('Введите A и B:');
Readln(a, b);
a1 := a;
b1 := b;
while b1 <> 0 do
begin
c := a1 mod b1;
a1 := b1;
b1 := c;
end;
if b <> 0 then
Writeln('НОК(', a,',', b,') = ', a div a1 * b)
else
Writeln('НОК(', a,',', b,') = ', a);
end.