#P1204B. Mislove Has Lost an Array
Mislove Has Lost an Array
No submission language available for this problem.
Description
Mislove had an array , , , of positive integers, but he has lost it. He only remembers the following facts about it:
- The number of different numbers in the array is not less than and is not greater than ;
- For each array's element either or is even and there is a number in the array.
For example, if , , then an array could be or ; but it couldn't be because this array contains different numbers; it couldn't be because is odd and isn't equal to ; and it couldn't be because there is a number in the array but there isn't a number .
According to these facts, he is asking you to count the minimal and the maximal possible sums of all elements in an array.
The only input line contains three integers , and (, ) — an array's size, the minimal number and the maximal number of distinct elements in an array.
Output two numbers — the minimal and the maximal possible sums of all elements in an array.
Input
The only input line contains three integers , and (, ) — an array's size, the minimal number and the maximal number of distinct elements in an array.
Output
Output two numbers — the minimal and the maximal possible sums of all elements in an array.
Samples
Note
In the first example, an array could be the one of the following: , or . In the first case the minimal sum is reached and in the last case the maximal sum is reached.
In the second example, the minimal sum is reached at the array , and the maximal one is reached at the array .