Being a traveler is always an exciting and memorable experience, especially for iSea. He is a crazy Splendid Moment Collector, not only he likes the wonderful scenery very much, what’s more, he wants himself go through the moment at the very time!
Our beautiful country has N scenic spots, which can be treated as some single points with a coordinate (Xi, Yi), and as a clever prophet, iSea knows the splendid moment of each spots Ti, and he must arrive this spot exactly at Ti time if he want to collect this spot’s splendid moment.
iSea has a speed of V, while travelling between spots, obviously he will choose the shortest path: the straight line. In the beginning, he can choose any spot to start his journey, but in the end, he must return the spot he chooses at first.
Perfectionist pushes himself to gather everything all the time, so does iSea. However, life can’t stand by you the whole days. So iSea wonders the maximum number of splendid moments he can collect, and in all of these journeys have the maximum number, he expects to choose the one has the shortest distance.