def f(n,d)[n/n.gcd(d),d/n.gcd(d)]end t,u,v=$<.map &:to_i a,b=f(t-u,t*u) c,d=f(u-v,u*v) puts [b*d/b.gcd(d),a.gcd(c)]*'/'