Telebashnya
A television company has a map of the country that shows the locations of cities and their respective populations. They aim to install a TV tower in a location that maximizes the number of residents who can receive TV broadcasts. The TV tower's signal reaches all points within a distance of R. Your task is to write a program that determines the optimal city for installing the TV tower. For safety reasons, the tower can only be installed in one of the cities.
Input
The input begins with the radius 0 ≤ R ≤ 10000 of the TV tower's coverage area and the number of cities N (1 ≤ N ≤ 100) in the country. Following this, each city's information is provided, including its coordinates (x, y) and population. All coordinates are integers with absolute values not exceeding 10000, and the population is a non-negative integer not exceeding one million.
Output
The output should display two pieces of information separated by a space: first, the maximum number of residents who can receive the signal from the TV tower, and second, the index of the city where the TV tower should be installed.