Fakes and Shidget

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

Pavel loves the game Fakes and Shidget very much. The game literally consists of the following process. The player uniformly randomly meets one of nn characters. Every character offers the player to choose one of two quests. The first quest of the ii-th character requires a_ia\_i minutes to complete and brings b_ib\_i gold, and the second quest requires c_ic\_i minutes and brings d_id\_i gold. The player chooses one of these quests, completes it and immediately meets another random character, and so on.

Pavel will play this game infinitely long. How fast can he earn gold if he will play optimally?

More formally, let tt is the time Pavel plays this game, and g(t)g(t) is the amount of gold he earns for the time tt. You should find the limit lim_tg(t)t\lim \limits\_{t \to \infty} \frac{g\left(t\right)}{t}.

입력

The first line contains an integer nn (1n2000001 \le n \le 200000) --- the number of characters in the game.

Each of the next nn lines contains four integers a_ia\_i, b_ib\_i, c_ic\_i and d_id\_i (1a_i,b_i,c_i,d_i1091 \le a\_i, b\_i, c\_i, d\_i \le 10^{9}) --- the duration of the first quest, the reward for the first quest, the duration of the second quest, the reward for the second quest of the ii-th character.

출력

Output one floating point number --- the maximal possible speed of earning gold.

The absolute or relative error of the answer shouldn't exceed 10910^{-9}.