eolymp
bolt
Try our new interface for solving problems
Problems

Sort the points by coordinates

Sort the points by coordinates

The coordinattes of $n$ points are given on a plane. Print them in increasing order of their abscissa. In the case of a tie, sort the points in decreasing order of ordinate. \InputFile Each line contains the pair of numbers $x, y~(0 \le x, y \le 10^9)$ --- the coordinates of one point. \OutputFile Print the points in the required order. Print the coordinates of each point on a separate line.
Time limit 3 seconds
Memory limit 128 MiB
Input example #1
3 4
1 2
5 1
3 3
3 1
Output example #1
1 2
3 4
3 3
3 1
5 1