Fireflies

No attempts yetTime limit1sMemory limit128 MB

Problem

There are nn fireflies moving in a plane. Firefly ii starts at (xi,yi)(x_i, y_i) and moves with constant velocity (ai,bi)(a_i, b_i). After time tt its position is (xi+tai,yi+tbi)(x_i + t \cdot a_i, y_i + t \cdot b_i).

You want to capture every firefly in one axis-aligned square photo frame. You may choose the shutter time tt freely. Find the minimum side length dd of a square, with sides parallel to the axes, that can contain all fireflies at some time tt.

Input

The first line contains an integer nn (1n1000001 \le n \le 100\,000).

Each of the next nn lines contains four integers xi,yi,ai,bix_i, y_i, a_i, b_i (106xi,yi,ai,bi106-10^6 \le x_i, y_i, a_i, b_i \le 10^6). (xi,yi)(x_i, y_i) is the starting position and (ai,bi)(a_i, b_i) is the velocity vector.

Output

Print one real number dd, the minimum possible side length of an axis-aligned square that covers all fireflies at some time tt. Your answer is accepted if it differs from the correct value by at most 10310^{-3} in absolute or relative error.

Hint

At any time, compute the span of xx coordinates and the span of yy coordinates; the needed side length is the larger of the two. The objective over time is convex, so ternary search works.