input""s,e,p for i=0to p a=(e-s)*i+s*p c=a d=p while(d)t=mod(c,d) c=d d=t wend ?a/c; if p>c?"/",p/c; next