Farmer John is rewarding his cows for their hard work with a day trip to the big city, and the cows must decide how to spend their free time.
They have a detailed map of the city showing $L$ ($2 \le L \le 1000$) major landmarks (numbered $1$ through $L$) and $P$ ($2 \le P \le 5000$) one-way cow paths that connect them. Farmer John drives the cows to a starting landmark of their choice; from there they walk along the paths through a series of landmarks and eventually return to that same starting landmark, where Farmer John picks them up. Because space in the city is scarce, every cow path is narrow and may be walked in one fixed direction only.
The cows may stay in the city as long as they like, but they bore easily: visiting a new landmark is fun, yet walking between landmarks costs time. Every landmark $i$ has a known fun value $F_i$ ($1 \le F_i \le 1000$).
Cow path $i$ runs from landmark $L1_i$ to landmark $L2_i$ (in the direction $L1_i \to L2_i$) and takes time $T_i$ ($1 \le T_i \le 1000$) to traverse.
To make the most of the day off, the cows want to maximize the average fun value per unit time of their trip. A landmark is only fun the first time it is visited; passing through it again grants no additional fun. Farmer John also insists that the trip visit at least two landmarks so the cows get some exercise.
Help the cows find the maximum average fun per unit time they can achieve.
0.00.In the sample, the trip $1 \to 2 \to 3 \to 5 \to 1$ collects fun $30 + 10 + 10 + 10 = 60$ over time $3 + 2 + 2 + 3 = 10$, for an average of $6.00$. The trip $2 \to 3 \to 5 \to 2$ averages only $30 / 6 = 5$, and any trip that passes through landmark $4$ averages less than $4$.