A standard set of dominoes consists of tiles. Each tile is a rectangle divided into sections, with each section displaying a number from the set \{0, 1, 2, 3, 4, 5, 6\}. The numbers on both sections can be identical. The set includes every possible tile, ensuring no two tiles have the same pair of numbers.
Now, consider a set of dominoes where each tile is divided into sections. The numbers on these sections are selected from a set containing distinct elements. Two tiles are considered identical if the multisets of numbers on them are the same (multiplicities matter). The set includes all possible tiles without duplicates.
Determine the total number of tiles in this set and the sum of all numbers on these tiles.
The first line contains two integers and .
The second line contains the numbers a_i of the set (1 \leq K \leq 10^4, 1 \leq N \leq 10^6, 1 \leq a_i \leq 10^9). All a_i are distinct.
Output two numbers in a single line: the total number of tiles in the set and the sum of all numbers on these tiles.
Example 1