Let m and n be two positive integers, 5 ≤ m ≤ 100, 2 ≤ n ≤ 100. Consider the following sets of triples:
The problem asks you to compute the sum:
Notes:
- ℕ is the set of non-negative integers (ℕ = {0, 1, 2, …}).
- card(Tm,j) is the number of elements of the set Tm,j.
Input
The input contains several test cases. Each test case occupies exactly two lines of input: the first line contains integer m, and the second line contains integer n. Tests should be read until the end of file is reached.
Output
For each test case, the result will be written to standard output, on a line by itself.
Sample
Input | Output |
---|---|
85 95 | 8128 |