#1010
Unrated
ZBROJ
시간 제한
1s
메모리 제한
32MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Author: Goran Gašić

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 viceversa. 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

예제 출력 1

36 37

예제 입력 2

1430 4862

예제 출력 2

6282 6292

예제 입력 3

16796 58786

예제 출력 3

74580 85582
코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.