favorite We need a little bit of your help to keep things running, click on this banner to learn more

White cubes

White cubes

Professor Samodelkin plans to make cubes out of white bars. The length of each cube side is 1 dm. After producing cubes professor decided to make all them white. How many cubes of side 1 dm will be able to make professor out of one bar, and how many faces he has to paint, if it is known that the lengths of bar sides are integers, and also given in decimetres.


Three integers - the sizes of the bar in dm, not greater than 106.


Print the number of received cubes and the number of faces to be painted.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1 2 3
Output example #1
6 14