The Train at the End of the World
Time limit1sMemory limit1024 MB
Given N stations joined in a chain by straight tracks, print the coordinates of the lowest point (smallest y) on the railway.
- Level
Easy2 of 10
- Topics
- Implementation, Geometry
- Solved
- No attempts yet
Statement
Southern Fuegian Railway is the southernmost railway in the world.
The Southern Fuegian Railway is drawn on a two-dimensional coordinate plane, where the positive direction of the -axis points east.
The Southern Fuegian Railway consists of stations and tracks connecting them. The -th station is at . The -th track is the line segment connecting station and station .
Seon-a went to see the Southern Fuegian Railway and wondered where the southernmost point on the southernmost railway in the world is.
Input
The first line contains the number of stations .
From the second line onward, lines follow. Each line contains two integers and , separated by a space, which are the coordinates of a station.
No two stations are at the same position.
Output
Print the and coordinates of the southernmost point on the Southern Fuegian Railway, separated by a space. Only inputs where this point is unique are given.