Program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
n,m,k,c:integer;
function NOD(x,y:integer):integer;
Begin
If x<>0 then NOD:=NOD(y mod x,x) else NOD:=y;
End;
function NOK(x,y:integer):integer;
Begin
NOK:=(x div NOD (x,y))*y;
end;
begin
writeln('Enter M, N, K');
write('m = ');readln(m);
write('n = ');readln(n);
write('k = ');readln(n);
c:=NOK(k,m);
k:=nok(c,n);
writeln('NOK(M,N,K) = ',k);
readln;
end.