题目描述
Problem Description
The teacher gave Perica two numbers \(a\) and \(b\). Perica wrote them down in his notebook and is tasked with calculating their sum.
During the copying process, Perica might mistakenly write the digit \(6\) as \(5\) or the digit \(5\) as \(6\), or he might not make any mistakes at all.
Given \(a\) and \(b\), determine the minimum and maximum sums that Perica could possibly calculate.
Input Format
The input consists of a single line with two integers, representing \(a\) and \(b\).
Output Format
Output a single line with two integers, representing the minimum and maximum possible sums.
Sample Input and Output
Sample Input #1
11 25
Sample Output #1
36 37
Sample Input #2
1430 4862
Sample Output #2
6282 6292
Sample Input #3
16796 58786
Sample Output #3
74580 85582
Notes
Data Size and Constraints
For all test cases, it is guaranteed that \(1 \leq a, b \leq 10^6\).
Notes
This problem is translated from COCI2010-2011 CONTEST #3 T2 ZBROJ.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分