F - Folding

Time limit: 2 s
Memory limit: 256 MiB
Languages: C, C++, Java, JavaScript, ... (details)

As you can remember, Alex is fond of origami. She switched from squares to rectangles, and rectangles are much more difficult to master. Her main interest is to determine what is the minimum possible number of folds required to transform $W \times H$ rectangle to $w \times h$ one. The result of each fold should also be rectangular, so it is only allowed to make folds that are parallel to the sides of the rectangle.

Help Alex and write a program that determines the minimum required number of folds.

Input

The first line of the input contains two integers $W$ and $H$ — the initial rectangle dimensions. The second line contains two more integers $w$ and $h$ — the target rectangle dimensions ($1 \le W, H, w, h \le 10^9$).

Output

Output a single integer — the minimum required number of folds to transform the initial rectangle to the target one.
If the required transformation is not possible, output $-1$.

Sample test(s)

Input
2 7 2 2
Output
2
Input
10 6 4 8
Output
2
Input
5 5 1 6
Output
-1

Hints

In the first example you should fold $2\times7$ rectangle to $2\times4$, and then to $2\times2$.

In the second example you should fold $10\times6$ rectangle to $10\times4$, then to $8\times4$, and rotate it to $4\times8$.

In the third example it is impossible to fold $5\times5$ rectangle to $1\times6$ one (remember that folds must be parallel to the rectangle sides).