uses crt;
var a,b:integer; {------------------------chuong-trinh-con-tim-uoc-chung-lon-nhat-cua-a-va-b----------------------}
function ucln(x,y:integer):integer;
var i,uc:integer;
begin
uc:=1;
if x<y then
begin
for i:=1 to x do
if (x mod i=0) and (y mod i=0) then
begin
if uc<i then uc:=i;
end;
end
else begin
for i:=1 to y do
if (x mod i=0) and (y mod i=0) then
begin
if uc<i then uc:=i;
end;
end;
ucln:=uc;
end;
{-----------------------chuong-trinh-chinh---------------------}
begin
clrscr;
write('Nhap so a='); readln(a);
write('Nhap so b='); readln(b);
a:=a div ucln(a,b);
b:=b div ucln(a,b);
writeln('Phan so toi gian la: ',a,'/',b);
readln;
end.