There's a cartoon show you made called Comet Universe that you're working on by yourself. After releasing the pilot episode (episode $$$0$$$) which got a perfect rating of $$$10$$$, you plan to release $$$N$$$ episodes, numbered from $$$1$$$ to $$$N$$$. To release the episodes, you want to do what's called a comet bomb.
You have $$$N\times M$$$ days to work on your cartoon, numbered from $$$1$$$ to $$$N\times M$$$. For each episode $$$i$$$ ($$$1\leq i\leq N$$$), you have to finish it by the end of day $$$i\times M$$$ so the episode can air by that time. For each day, you can only choose to work on one episode. An episode is said to be ready if you've worked on it for a total of at least $$$A$$$ days. An episode is said to be excellent if you've worked on it for a total of at least $$$B$$$ days ($$$B\geq A$$$).
When an episode airs, there are three cases:
What's the maximum possible sum of ratings of episodes $$$1$$$ through $$$N$$$ if every episode must be ready when it airs? Or report if it's impossible!
The only line contains four integers $$$N$$$, $$$M$$$, $$$A$$$, and $$$B$$$ ($$$1\leq N,M\leq100\,000$$$; $$$1\leq A\leq B\leq100\,000$$$) — the number of episodes, the number of days between episodes, the number of days for an episode to be ready, and the number of days for an episode to be excellent.
A single integer representing the maximum possible sum of ratings of episodes $$$1$$$ through $$$N$$$ if every episode must be ready when it airs, or report -1 it's impossible.
4 3 2 5
36
1 10 100 1000
-1
In the first example, you can do the following for each day:
The sum of ratings of episodes $$$1$$$ through $$$4$$$ is $$$9+8+10+9=36$$$.
| Name |
|---|


