program TinhTongVaUocCuaTong;
var a, b, tong, i: integer;
SoNguyenTo: boolean;
begin
writeln('Nhap vao hai so a va b (a > 0, b > 0): ');
write('a = ');
readln(a);
write('b = ');
readln(b);
tong := a + b;
writeln('Tong cua a + b = ', tong);
writeln('Uoc cua tong a + b: ');
for i := 1 to tong do
begin
if tong mod i = 0 then
writeln(i);
end;
SoNguyenTo := true;
if tong < 2 then
SoNguyenTo := false
else
for i := 2 to trunc(sqrt(tong)) do
begin
if tong mod i = 0 then
begin
SoNguyenTo := false;
break;
end;
end;
if SoNguyenTo then
writeln('Tong a + b la so nguyen to:')
else
writeln('Tong a + b khong phai la so nguyen to:');
end.