uses crt;
var a,b,i,ucln,t,x:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
writeln('Tong cua hai so la: ',a+b);
writeln('Hieu cua hai so la: ',a-b);
writeln('Tich cua hai so la: ',a*b);
writeln('Thuong cua hai so la: ',a/b:4:2);
ucln:=1;
if a<b then
begin
for i:=1 to a do
if (a mod i=0) and (b mod i=0) then
begin
if ucln<i then ucln:=i;
end;
end
else begin
for i:=1 to b do
if (a mod i=0) and (b mod i=0) then
begin
if ucln<i then ucln:=i;
end;
end;
writeln('Uoc chung lon nhat la: ',ucln);
t:=0;
x:=abs(a+b);
for i:=1 to x do
if x mod i=0 then t:=t+i;
writeln('Tong cac uoc duong cua |',a,'+',b,'| la: ',t);
readln;
end.