Big P is fairly good in mathematics.
His teacher has asked him to add two numbers.
Now , Big P has a problem that he sometimes writes a '6' as a '5' and vice versa.
Given two numbers, A and B, calculate the minimum and the maximum sum Big P could possibly get.
The first and only line of input contains positive integers A and B .
In single line of output, print two space separated integers, minimum and maximum sum Big P could get.
1<= A,B <= 1000000