All problems

Labeling Each Point With Text

mediumPythonMatplotlibplt.annotate

Meridian Insight rates a client's suppliers on two failings: how far over budget they ran, and how many days late they delivered. Both are counted up from zero, so the zero-zero corner of the picture is the supplier that did neither, and every dot's distance from that corner is a measure of how badly it fell short. There are few enough suppliers to write each name beside its own dot. The caption names the best of them.

Task: Print the name of the supplier whose dot sits closest to the zero-zero corner, measuring the straight-line distance from that corner. If two suppliers are exactly the same distance away, print whichever of them appears earlier in the list.

Input

The first line holds an integer n, the number of suppliers. Each of the next n lines holds three fields separated by single spaces: the supplier's name, which is one word containing no spaces, then its two failing measures. n is at least 1.

Output

One line holding the supplier's name, spelled exactly as it appeared in the input.

Example:

Input:
3
A 3 4
B 1 1
C 10 10

Output:
B

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…