I overslept, and today is the contest day. On top of that I got lost somewhere in Delft on my way from the hotel to the contest site. All around me are grachten, the city canals that run through many towns in the Netherlands. I am in a hurry, because the NWERC contest starts in a few minutes.
Worse, a cycling race is going through Delft today and several bridges are closed. So instead of searching for an open bridge, I decided to jump over a gracht.
Everyone knows that computer scientists like me are good at algorithms but not very good athletes. I am also faint-hearted and do not want to get wet. So I need your help to work out how far I have to jump.
Luckily I joined yesterday's excursion through the center of Delft, where I learned that every paving stone in the city is a square of the same size. That lets me measure my own side of the gracht in paving stones.
I walked from point C to point D by way of points A and B, counting paving stones as I went.
Points A and C always lie on the edge of the gracht on my side. Points B and D are the same distance from the gracht. The target point T always lies on the edge of the far side: it is the intersection of the line through B and A with the line through D and C. The angle between AT and AC is 90 degrees, and the two edges of the canal are parallel lines.
Please compute the distance between A and T, which is the jump distance I need.
The input consists of several test cases. Each line contains three positive integers: the distance between A and B, the distance between A and C, and the distance between B and D, in that order. The input ends at end of file.
No distance is larger than 1000, and the distance between B and D is larger than the distance between A and C.
For each test case, print one line with the distance between A and T as a reduced fraction. Remove every common factor of numerator and denominator and write the result as numerator/denominator, keeping the denominator even when it is 1.