n=int(input())
a=[]
for _ in range(n):
a.append(list(map(int, input().split())))
a.sort(key=lambda x:(x[1], x[0]))
for i in range(n):
print(a[i][0],a[i][1])
'백준 풀이' 카테고리의 다른 글
백준 1010번 파이썬 (0) | 2022.08.26 |
---|---|
백준 11723번 파이썬 (0) | 2022.08.26 |
백준 11866번 파이썬 (0) | 2022.08.26 |
백준 1676번 파이썬 (0) | 2022.08.26 |
백준 10814번 파이썬 (0) | 2022.08.26 |