main=interact$(unwords&).map read.words u&[a,b,c]=u[x%c++u['/':c%x|c%x>"1"]|x<-[a*c,a*c+b-a..b*c]] (%)x=show.div x.gcd x