题目描述
Problem Description
Luogu Online School has conducted a final exam, and the students, after studying the courses, have achieved excellent results.
Z ranked first in the exam, and yz ranked second. The teacher decided to buy some cookies to reward the two children.
The teacher bought three boxes of cookies. The first box contains $a$ cookies, the second box contains $b$ cookies, and the third box contains $c$ cookies. The teacher decided to reward Z and yz with these three boxes of cookies, which cannot be split.
The teacher wants Z to receive no fewer cookies than yz, but also wants the difference in the number of cookies they receive to be as small as possible. How many cookies will Z and yz each receive?
Input Format
Input consists of three integers on a single line, representing $a$, $b$, and $c$ respectively.
Output Format
Output consists of two integers on a single line, separated by a space. The first integer represents the number of cookies Z receives, and the second integer represents the number of cookies yz receives.
Sample Input and Output
Sample Input #1
3 1 5
Sample Output #1
5 4
Sample Input #2
3 3 5
Sample Output #2
6 5
Notes
Sample Explanation 1
Z takes 5 cookies, and yz takes 3+1=4 cookies.
Sample Explanation 2
Z takes 3+3=6 cookies, and yz takes 5 cookies.
Data Range and Constraints
- For 30% of the test cases, $a = b = c$;
- For 100% of the test cases, $1 \le a, b, c \le 1000$.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分