Safe Distance

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

문제

The past year has been difficult, with a virus spreading among the population. Fortunately, Alice knows that one of the keys to be healthy is to keep a safe distance from other people.

Alice is currently in a closed room, represented in the 2D2D plane, with width XX and height YY. There are NN other people inside the room, and we're given their (x_i,y_i)(x\_i, y\_i) coordinates.

We consider Alice and the NN people as points in the 2D2D plane. Alice's initial position is (0,0)(0, 0) and she wants to move to the exit at position (X,Y)(X, Y). She can move freely in any direction inside the room, but can not step outside the room bounds.

Find the maximum distance Alice can keep from other people while moving from (0,0)(0, 0) to (X,Y)(X, Y).

입력

The input begins with one line containing two space-separated integers, XX and YY, where XX is the width, and YY is the height of the room.  The second line consists of a single integer NN, the number of people in the room.  Then NN lines follow, each of them consisting of two floating-point numbers x_ix\_i and y_iy\_i, the coordinates of the ithi^{th} person in the room.

출력

The output consists of a single value dd, the maximum safe distance,  as a floating-point number. 

An additive or multiplicative error of 10510^{-5} is tolerated: if dd is the answer, any number either within \[d105;d+105]\[d - 10^{-5}; d + 10^{-5}] or within \[(1105)d;(1+105)d]\[(1 - 10^{-5})d ;(1 + 10^{-5})d] is accepted.

제한

  • 1X,Y1,000,0001 \le X, Y \le 1\\,000\\,000
  • 1N1,0001 \le N \le 1\\,000
  • 0x_iX0 \le x\_i \le X
  • 0y_iY0 \le y\_i \le Y