#918. Sort pairs
You get n lines with pairs `a b`. Sort them by b in increasing order; if b is equal, by a in increasing order. Print them.
### Input
n, then n lines.
### Output
n lines.
Examples
Input
3 8 5 2 5 2 0
Output
2 0 2 5 8 5
Input
6 1 0 3 0 4 4 1 4 5 4 2 1
Output
1 0 3 0 2 1 1 4 4 4 5 4
💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.