Fox Calling

Program time limit: 1 second

Program memory limit: 512 MB

While Frank, the CPMSoc fox, uses his powerful speaker to wake up all his friends in the morning, it's Cyril's job to call them back home. The problem is that the foxes are already awake and wandering across a 2D plane! Each fox starts at a specific initial position (x_i, y_i) and moves at its own constant 2d velocity(vx_i, vy_i).

Because Cyril is feeling lazy, he decides to stay put in one fixed spot with the speaker $(X, Y)$. Help Cyril find the minimum possible broadcast radius over all times $t \ge 0$, where the required radius at time $t$ is the distance from $(X, Y)$ to the furthest fox at that time.

Input

  • The first line of input contains one integer $N$, where $N$ is the number of foxes.
  • The second line of input contains two integers $X$, $Y$, the fixed position Cyril sits in.
  • Then follow $N$ lines, followed by $x_i$, $y_i$, $vx_i$, $vy_i$, which says that the ith fox is initially located at ($x_i$, $y_i$), and it is travelling in a constant 2d velocity ($vx_i$, $vy_i$).

You should read from standard input.

Constraints

For all test cases:

  • $0 \le N \le 10^6$.
  • $0 \le X,Y \le 10^9$.
  • $0 \le x_i, y_i, vx_i, vy_i \le 10^9$ for all $i$.

Additionally:

  • For Subtask 1 (30% of points): $N = 1$.
  • For Subtask 2 (70% of points): there are no additional constraints.

Output

The smallest possible radius Cyril needs to use.

Your answer will be accepted if its absolute or relative error is less than $10^{-6}$.

You should write to standard output.

Sample Input 1

1
5 0
0 1 1 0

Sample Output 1

1.000000

Explanation 1

At time stamp 5, the fox will be at (5,1), which is 1.00000 away from Cyril, the smallest possible distance.

Scoring

For each subtask (worth 30% and 70% of points, as per the Constraints section), your program will be run on multiple secret test cases one after another, and if it produces the correct output for all test cases, it solves that subtask. Your program will receive the points for each subtask it solves. Recall that your final score on the task is the score of your highest scoring submission.


Submit unofficially

The contest ended at 8:45 p.m. AEST on Tuesday 7th April. All submissions will be unofficial officially.

Log in to submit!