#D5039. Rainy Bus Stops

    ID: 4190 Type: Default 2000ms 268MiB

Rainy Bus Stops

Rainy Bus Stops

problem

AOR Ika is at the S S th bus stop at time 0 0 and wants to go from there to the G G th bus stop. The number of bus stops N N and M M routes (*) connecting different bus stops are given. The bus stops are numbered 1, dots,andN 1, \ dots, and N , respectively. Each route consists of 4 4 values: origin u u , destination v v , departure time t t , and travel time c c . You can catch the bus if you are at the departure u u at the time t t and arrive at the destination v v at the time t+c t + c . While not on the bus, AOR Ika gets wet in the rain. When heading to the G G th bus stop through the route that minimizes the time of getting wet in the rain, output the total time of getting wet in the rain from the time 0 0 to the arrival at the G G th bus stop.

(*) In graph theory terms, a path is a sequence of vertices and edges, but please note that it is used here to mean edges.

input

Input is given from standard input in the following format.

N M S G N \ M \ S \ G u1 v1 t1 c1 u_1 \ v_1 \ t_1 \ c_1  vdots \ vdots uM vM tM cM u_M \ v_M \ t_M \ c_M

output

Print the minimum amount of time you get wet in one line. Also, output a line break at the end.

Example

Input

2 2 1 2 1 2 10 100 1 2 5 500

Output

5

inputFormat

outputFormat

output the total time of getting wet in the rain from the time 0 0 to the arrival at the G G th bus stop.

(*) In graph theory terms, a path is a sequence of vertices and edges, but please note that it is used here to mean edges.

input

Input is given from standard input in the following format.

N M S G N \ M \ S \ G u1 v1 t1 c1 u_1 \ v_1 \ t_1 \ c_1  vdots \ vdots uM vM tM cM u_M \ v_M \ t_M \ c_M

output

Print the minimum amount of time you get wet in one line. Also, output a line break at the end.

Example

Input

2 2 1 2 1 2 10 100 1 2 5 500

Output

5

样例

2 2 1 2
1 2 10 100
1 2 5 500
5