import Ratio main=interact$s.show.f.map read.words f[a,b]=div(10^100*numerator t)$denominator t where t=(1%1)#(3%1)!!500;l#u|x^^a