Sakurako is playing checkers. Right now, out of played games, she has won games (p<q).
She wants to increase her winrate. She wants it to be equal to at least \frac{a}{b} (where and are co-prime numbers).
Integers and are called co-prime numbers if their GCD (greatest common divisor) equals one.
What is the minimum amount of games that she needs to play so that her winrate becomes at least \frac{a}{b} (a<b)?
Win rate is equal to \frac{x}{x+y}, where is the amount of games that Sakurako wins and is the amount of games that she loses.
The first line contains two integers and (0\le p < q \le 10^6).
The second line contains two co-prime integers and (0\le a < b \le 10^6).
Output the minimum amount of games that Sakurako needs to play in order for her win rate to become at least \frac{a}{b}.
Example 1
If Sakurako wins all five games, her winrate will be \frac{1+5}{3+5}=\frac{6}{8}, which is bigger than \frac{8}{11}. It is possible to show that if she plays only four games, it is not going to be enough.
In this problem, there are conditional blocks. If your solution works correctly for certain constraints, it will receive a certain number of points. Note that testing is going test by test, but not by blocks.
( points): p,q\le 10^4;
( points): without additional constraints.