You are traveling through a car to your destination. The car is \(D\) units from your destination. There are \(N\) petrol stations between your current location and destination.
You are required to reach the destination by making the minimum possible number of stops on the way to your destination. The capacity of the petrol tank is large as there is no limit to the amount of petrol it can store. The car contains some initial amount of petrol in the tank that is denoted by \(P\).
Determine the minimum number of stops that is required to reach the destination or whether you can reach the destination.
Note:
Your destination is situated at coordinate \(0\). All the other distances are given with respect to the destination's location.
Input format
- First line: An integer \(N\) denoting the number of petrol stations on the way to your destination
- Each of the next \(N\) lines: Two space-separated integers \(S\) and \(F\) denoting the distance from the destination to the station and the amount of petrol available at that station respectively
- Next line: Two space-separated integers \(D\) and \(P\)
Output format
Print a single integer denoting the minimum number of stops that is required to reach the destination. If it is not possible to reach the destination, then print \(-1\).
Constraints
\(1\le N \le 10^5 \)
\( 1 \le D,P,S,F \le 10^{9} \)