Ivan’s disqualification (1)

Ivan is participating in the ACM-ICPC World Finals in Ekaterinburg. As usual, Ivan is trolling, so he is going to be disqualified. However, the guys of the organization must first reach him. Ivan is trying to escape in the spectators zone, which for simplicity we consider a circumference. Ivan is located at an angle of α\alpha degrees with respect to the center of the circunference, while the nn guys are located at angles α1,,αn\alpha_1, \dots, \alpha_n. Ivan has a maximum angular speed of ii degrees per second, while the nn guys have all a maximum angular speed gg.

How many second will it take any of the guys of the organization to reach Ivan? Suppose that Ivan tries to maximize this time, while the guys coordinate to try to minimize it. At every moment, everyone can move in any direction (left or right), but never exceding his maximum speed. When calculating, treat averybody as a point.

Input

Input consists of several cases, each with ii, gg, α\alpha, nn, α1\alpha_1, …, αn\alpha_n. All numbers are integers. The speeds are between 1 and 1000, the angles between 0 and 359, and nn between 1 and 1000.

Output

For every case, print the time of Ivan’s disqualification with four digits after the decimal point. Print “never” if this will never happen.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T11:41:00.276Z

© Jutge.org, 2006–2026.
https://jutge.org