var g,a,b:word;c:char;begin repeat read(a,c,b);g:=a;while a mod g+b mod g>0do g:=g-1;writeln(a div g,c,b div g)until 0>1end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page