uses crt;
var a,b,c,ucln,bcnn,i,min:longint;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
write('Nhap c='); readln(c);
min:=a;
if min>b then min:=b;
if min>c then min:=c;
ucln:=1;
for i:=1 to min do
if (a mod i=0) and (b mod i=0) and (c mod i=0) then
begin
if ucln<i then ucln:=i;
end;
bcnn:=a*b*c;
for i:=a*b*c downto 1 do
if (i mod a=0) and (i mod b=0) and (i mod c=0) then
begin
if bcnn>i then bcnn:=i;
end;
writeln('Uoc chung lon nhat: ',ucln);
writeln('Boi chung nho nhat: ',bcnn);
readln;
end.