ZBROJ
시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2010-2011BOJ 2864
문제
After he got tired of rotating tables, the teacher gave Perica another problem. She wrote two integers, A and B, on the blackboard and asked him to add them.
Perica is never wrong with his calculation, but sometimes he doesn’t copy the numbers correctly. The only mistake he ever makes is copying a ‘5’ as a ‘6’, and vice versa.
Given two numbers, A and B, calculate the minimum and the maximum sum Perica could possibly get.
입력
The first and only line of input contains positive integers A and B (1 ≤ A, B ≤ 1 000 000).
출력
In single line of output, print two space separated integers, minimum and maximum sum Perica could get.
예제
예제 1
입력
11 25
출력
36 37
예제 2
입력
1430 4862
출력
6282 6292
예제 3
입력
16796 58786
출력
74580 85582
코드를 제출하려면 로그인하세요.