Life expectancy

Good health and well-being is the third target of the United Nations Suistanable Development Goals (SDGs). One way to assess health in a population is by looking at mortality data. Life expectancy measures how many years, on average, a person is expected to live based on current age death rates.

Given the life expectancy of several countries in two different years y1y_1 and y2y_2, compute the country with best life expectancy on y1y_1, the country with best life expectancy on y2y_2, and the country with the best life expectancy improvement during the period.

Input

Input begins with two integer numbers y1y_1 and y2y_2, with 0y1<y21040 \le y_1 < y_2 \le 10^4. Follow data for several countries (at least one): a string with the country name (all different), and the country life expectancies of the two years. These are real numbers between 0.00 and 10000.00 with two digits after the decimal point.

Output

Print three lines with the required information. For the given test cases, there will always be a clear winner for the three queries.

In the first sample input, Sweden is the best of 1980 with 75.85, Spain is the best of 2019 with 83.56, and India has the best improvement: 69.6653.8169.66 - 53.81.

Problem information

Author: Jorge Castro

Generation: 2026-01-25T10:02:20.129Z

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