Froggy Ford

You may drop one extra stone anywhere between two river banks so the frog's crossing has the shortest possible longest hop.

Medium7Binary searchGeometryUnion-findGraphNo attempts yetTime limit1sMemory limit256 MB

Problem

Fiona is building a game called Froggy Ford. In it a frog crosses a river by hopping on stones. The river runs between the two straight banks x=0x = 0 and x=wx = w, and nn stones lie in the water strictly between the banks.

The frog starts at any point of the left bank, lands on stones one after another, and finishes at any point of the right bank. Since the frog takes off from and lands on any point of a bank, a leap between a bank and the stone at (x,y)(x, y) measures xx for the left bank and wxw - x for the right bank, and a leap straight from one bank to the other measures ww. A leap between two stones measures the Euclidean distance between them. A route uses any stones in any order, and the cost of a route is the length of its longest single leap.

The frog is weak, so a player picks the route whose longest leap is as small as possible. Fiona now lets the player drop one more stone into the river before the frog starts. The new stone goes at any real point (x+,y+)(x^+, y^+) with 0<x+<w0 < x^+ < w and 109y+109-10^9 \le y^+ \le 10^9, and a route may ignore it.

Over all placements of the new stone and all routes, find the smallest possible length of the longest leap.

Optimal routeOptimal route with the added stone

Input

The first line contains two integers ww and nn, the width of the river and the number of stones (1w1091 \le w \le 10^9, 0n10000 \le n \le 1000).

Each of the next nn lines contains two integers xix_i and yiy_i, the coordinates of one stone (0<xi<w0 < x_i < w, 109yi109-10^9 \le y_i \le 10^9). No two stones lie at the same point.

Output

Print the smallest possible length of the longest leap, with exactly three digits after the decimal point. The answer never falls exactly halfway between two consecutive three digit values, so the rounding is unambiguous.