Crapper and Co. is moving into a new office building. The front-desk (and the first floor) is located at room $$$0$$$. Rooms on even floors will each lead to $$$a$$$ rooms above it. Similarly, odd rooms will lead to $$$b$$$ rooms in the same fashion.
As you, the newest employee, are moving into your office at room $$$x$$$, an earthquake strikes, causing the building to begin to collapse. Before you inevitably die, you call the CEO Thomas to meet him, who is in his office at room $$$y$$$. As the benevolent CEO, Thomas agrees, but doesn't know where to meet you. Knowing that the building is collapsing, you calculate meeting location $$$m$$$ which minimizes the sum of your downwards travel distances (you can only travel this way because the tower is collapsing, so it doesn't make sense to go up) so you can finally meet the CEO. You call the CEO to meet at room $$$m$$$, and the two of you finally meet before the room collapses.
The first and only line of input contains four integers $$$a, b, x, y$$$ $$$(2\leq a, b\leq 10^9, 0\leq x, y\leq 10^9)$$$.
The room number of your meeting location $$$m$$$.
2 3 11 12
4
For the example input, the office building roughly looks like the following:

| Name |
|---|


