eolymp
bolt
Try our new interface for solving problems

UFO

In the small town began to operate \textbf{M} Control Service for unlawful flight of UFOs. The first task of the service - find out how many UFO acts in the vicinity of the city. Service agents have interviewed many witnesses and made ​​a list of cases a meeting with the UFO that took place at night, with the location and time of observation. Now, analysts want to understand how much really was a UFO. Of intelligence known maximum rate at which the UFO can fly. Analysts are asking you to find out what is the minimum number of UFO witnesses were able to observe. \InputFile The first line of the input file contains integers \textbf{n} and \textbf{v} - the number of sightings of UFOs and the maximum speed (\textbf{1} ≤ \textbf{n} ≤ \textbf{100}, \textbf{1} ≤ \textbf{v} ≤ \textbf{10000}). The following n lines contain descriptions of meetings with UFO cases in the format "\textbf{HH:MM x y}", where \textbf{HH:MM} --- At the meeting, \textbf{x} and \textbf{y} - coordinates of the location where the UFO was observed (for simplicity, we assume that all the meetings took place on the plane) . Coordinates module is not greater than \textbf{1000}. The rate is expressed in km / h, the coordinates - in km. \OutputFile Output to output a single number - the minimum possible number of UFOs.
Time limit 1 second
Memory limit 64 MiB
Input example #1
4 1
12:00 0 0
13:10 0 1
14:00 1 0
15:00 1 1
Output example #1
2