var n,m,i,d:word;c:char;begin repeat read(n,c,m);for i:=1to 999do if n mod i+m mod i=0then d:=i;writeln(n div d,c,m div d)until 1=0end.
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page