t | num_restriction = 100 | t | max_value = 100 |
| lst = [[0] * (num_restriction + 1) for i in range(num_restriction + 1)] | | count = [[0] * (max_value + 1) for _ in range(max_value + 1)] |
| while (nums := input()): | | while (str := input()): |
| num1, num2 = eval(nums) | | a, b = eval(str) |
| lst[num1][num2] += 1 | | count[a][b] += 1 |
| for i in range(num_restriction + 1): | | for i in range(max_value + 1): |
| for j in range(num_restriction + 1): | | for j in range(max_value + 1): |
| for k in range(lst[i][j]): | | for _ in range(count[i][j]): |
| print(f'{i}, {j}') | | print(f'{i}, {j}') |