B4467 Splitting the Water Bill / bill
Description
Xiaoshan and Xiaoxi share an apartment and need to split the monthly water bill together. The water bill uses a tiered pricing system with the following rules:
1. For the portion of total monthly water usage not exceeding $10$ cubic meters (including $10$ cubic meters), the rate is $4$ yuan per cubic meter.
2. For the portion of total monthly water usage exceeding $10$ cubic meters, the rate is $5$ yuan per cubic meter.
Xiaoshan uses $a$ cubic meters of water per month, and Xiaoxi uses $b$ cubic meters of water per month.
They have agreed on a set of rules for splitting the total cost:
1. If the total water usage does not exceed $10$ cubic meters, they split the cost equally.
2. If the total water usage exceeds $10$ cubic meters, the cost for the first $10$ cubic meters is split equally, and the cost for the portion exceeding $10$ cubic meters is paid entirely by the person who uses more water (either $a$ or $b$).
Input Format
A single line containing two integers $a$ and $b$, representing the water usage contributed by Xiaoshan and Xiaoxi respectively (in cubic meters). It is guaranteed that $a$ is not equal to $b$.
Output Format
A single line containing two integers separated by a space, representing the final water bill amounts that Xiaoshan and Xiaoxi should pay respectively (in CNY).
Explanation/Hint
#### [Sample $1$ Explanation]
$5+410$, therefore they do not split the bill equally.
For the first $10$ cubic meters: $(5+5)\times 4 = 40$;
For the portion exceeding $10$ cubic meters: $(5+6-10)\times 5 = 5$;
They split the $40$ equally, and the remaining portion is paid by Xiaoxi. Therefore, Xiaoshan pays $20$ yuan, and Xiaoxi pays $25$ yuan.
#### [Constraints]
For $30\%$ of the test cases, $0 \le a, b \le 5$.
For another $30\%$ of the test cases, $5 < a, b \le 20$.
For $100\%$ of the test cases, $0 \le a, b \le 20$, and $a \neq b$.
---
Translated by DeepSeek-V3