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