Description: One day, Ding compiled a full day program, I suddenly felt tired, so they decided to walk around the room. His room is rectangular, and he began to pick from a computer point of view began to walk. As a habit, Ding Junhui is always walking a straight line, and hit the wall after the rebound, the incident angle and exit angle of the same. Ding Junhui will have to walk until the burst of inspiration again. Assuming he s walking speed is uniform, and now, Ding s mother wanted to know how long he was a total break to remind him to continue working.
Ding Junhui trying to quiz his mother, so he recorded his own hit the wall and told her the sequence, there is no way you can help her calculate the Ding s journey?
Enter
Input consists of multiple test cases, each test case are as follows:
The first line contains two numbers w, l (0 <w, l <= 1000), representing the width and length of the room
The second line contains two numbers x0, y0, on behalf of the computer s location
To Search:
File list (Check if you may need any files):
丁俊晖\Debug\vc60.idb
......\.....\vc60.pdb
......\.....\丁俊晖.exe
......\.....\丁俊晖.ilk
......\.....\丁俊晖.obj
......\.....\丁俊晖.pch
......\.....\丁俊晖.pdb
......\丁俊晖.c
......\丁俊晖.dsp
......\丁俊晖.dsw
......\丁俊晖.ncb
......\丁俊晖.opt
......\丁俊晖.plg
......\Debug
丁俊晖