CSES - KILO 2015 5/5 - Flights
  • Time limit: 2.00 s
  • Memory limit: 128 MB

Uolevi wants to travel from Possula to Kärsälä. You know all flights between the cities in the country and their prices.

Each flight gives you a bonus coupon that has some value xx between 11 and 9999. If you use the coupon, you have to pay only xx percent of the total price of the trip. However, you can use at most one coupon.

What is the lowest price for a trip from Possula to Kärsälä?

Input

The first input line contains two integers nn and mm: the number of cities and the number of flights. The cities are numbered 1,2,,n1,2,\ldots,n. City 1 is Possula, and city nn is Kärsälä.

After this, the input contains mm lines that describe the flights. Each line contains four integers aa, bb, pp and xx. This means that there is a flight from city aa to city bb with price pp and bonus xx. All flights are oneway flights.

Output

You should output the lowest price for Uolevi's trip. It is guaranteed that there is always a sequence of flights from Possula to Kärsälä. An output is considered correct if it has absolute error less than 10310^{-3}.

Constraints

  • 2n1052 \le n \le 10^5
  • 1m21051 \le m \le 2 \cdot 10^5
  • 1a,bn1 \le a,b \le n
  • 1p1091 \le p \le 10^9
  • 1x991 \le x \le 99

Example

Input:

3 4
1 2 2 31
2 1 3 39
2 3 8 56
1 3 5 92

Output:

3.1

Explanation: You can use route 1231 \rightarrow 2 \rightarrow 3. The total price is 1010 but you have to pay only 3.13.1 using the bonus coupon whose value is 3131.