You are given N points (Xi,Yi) where 1≤i≤N. Print the N points in ascending order with respect to Xi. If there is more than one point with the same X value, then print the point that contains the larger Y value first.
Input format
Output format
Print the N points in the same order illustrated in the question. The format of the output must be, "Xi Yi" without quotes. Each point must be printed in a new line.
Constraints
1≤N≤1000
−1000≤Xi,Yi≤1000
First we sort the points according to the increasing X co-ordinate but as (3,6) and (3,5) have the same X co-ordinate we place (3,6) above (3,5) because it has a greater Y co-ordinate.