Immigration

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

문제

Peter the Pig is riding a tractor, starting at the origin at moment 00 and moving along the xx-axis with speed uu. Since the road is infinite and not interesting enough, Peter is looking for entertainment. At moment t_0t\_0 he notices some object at point (x_0,y_0)(x\_0, y\_0) moving with velocity v_0=(v_0x,v_0y)v\_0 = (v\_{0x}, v\_{0y}). So, Peter starts to rotate his head always keeping his eyes fixed at the object. From time to time (nn times in total), the object changes its velocity. Namely, at moment t_it\_i the object instantly changes its velocity to v_i=(v_ix,v_iy)v\_i = (v\_{ix}, v\_{iy}) for i=1,2,,ni = 1, 2, \ldots, n. It is guaranteed that the object never collides with Peter.

Define f(t)f(t) as the directed angle (measured in radians) between xx-axis and the direction from Peter to the object at moment tt. We allow f(t)f(t) to differ from the actual angle by a multiple of 2π2 \pi as long as the function f(t)f(t) is continuous. Define the angular speed of Peter's head as the derivative f(t)f'(t). You need to find the maximum of f(t)|f'(t)| from the moment t_0t\_0 to the infinity. In other words, you need to find the maximum of the absolute value of angular speed. It is guaranteed that the answer is finite.

입력

The first line contains four integers uu, x_0x\_0, y_0y\_0, nn (1u1001 \le u \le 100, x_0,y_0108|x\_0|, |y\_0| \le 10^8, 0n1050 \le n \le 10^5) --- the speed of Peter's tractor, the coordinates of the object when first observed by Peter, and the number of times the object changes its velocity.

Each of the next (n+1)(n + 1) lines contains three space-separated integers t_it\_i, v_ixv\_{ix}, v_iyv\_{iy} (0t_i1060 \le t\_i \le 10^6, v_ix,v_iy100|v\_{ix}|, |v\_{iy}| \le 100). It is guaranteed that t_0<t_1<<t_nt\_0 < t\_1 < \ldots < t\_n. Note that it is possible that (v_ix,v_iy)=(0,0)(v\_{ix}, v\_{iy}) = (0, 0). Also note that movement of the object after moment t_nt\_n is infinite.

출력

In the only line print one real number with absolute or relative error not exceeding 10610^{-6} --- the maximum absolute value of the angular speed of Peter's head during his observation of the object.