CSES - KILO 2015 0/5 - Elevator Trouble
  • Time limit: 1.00 s
  • Memory limit: 128 MB

You are on your way to your first job interview as a program tester, and you are already late. The interview is in a skyscraper and you are currently in floor ss, where you see an elevator. Upon entering the elevator, you learn that it has only two buttons, marked "UP uu" and "DOWN dd". You conclude that the UP-button takes the elevator uu floors up (if there aren’t enough floors, pressing the UP-botton does nothing, or at least so you assume), whereas the DOWN-button takes you dd stories down (or none if there aren’t enough). Knowing that the interview is at floor gg, and that there are only ff floors in the building, you quickly decide to write a program that gives you the amount of button pushes you need to perform. If you simply cannot reach the correct floor, your program halts with the message "use the stairs".

Given input ff, ss, gg, uu and dd (floors, start, goal, up, down), find the shortest sequence
of button presses you must press in order to get from ss to gg, given a building of ff floors, or output “use the stairs” if you cannot get from ss to gg by the given elevator.

Input

The input will consist of one line, namely f s g u d, where 1s,gf10000001\leq s, g\leq f \leq 1000000 and 0u,d10000000\leq u, d\leq 1000000. The floors are one-indexed, i.e. if there are 10 stories, ss and gg will be in [1,10][1, 10].

Output

You must reply with the minimum numbers of pushes you must make in order to get from ss to gg, or output use the stairs if it is impossible given the configuration of the elevator.

Examples

Input:

10 1 10 2 1

Output:

6

Input:

100 2 1 1 0

Output:

use the stairs

Note

This problem is one of the problems of NCPC 2011.