uses crt;
var u, i2, b, t, i, x, y, dem: integer;
begin
clrscr;
write ('nhap x: '); readln (x);
write ('nhap y: '); readln (y);
b:=x*y;
t:=y mod x;
while t<>0 do
begin
t:=x mod y;
x:=y;
y:=t;
end;
u:=x;
b:=b div u;
writeln ('UCLN la: ',u);
writeln ('BCNN la: ',b);
dem:=0;
for i:=1 to x do
if x mod i = 0 then
begin
write (i,' ');
dem:=dem+1;
end;
writeln ('co tat ca ',dem,' UC');
readln;
end.