#GYM104767K. Screamers in the Storm

Screamers in the Storm

本题没有可用的提交语言。

Description

Students visiting the Multidimensional Data Cabinet at Tomorrow Programming School may get access to multidimensional hyperspheres stored in air-conditioned helium cupboards in the cabinet. Before exploring a chosen sphere, a student has to prove he/she is knowledgeable enough to handle the sphere. There are spheres of various dimensions and various integer radiuses, each in a separate locked cupboard. The dimension and the radius of the sphere are written on the cupboard label. To unlock the cupboard, the student has to enter a specific value into the lock mechanism. The value depends on the dimension and the radius of the sphere. It is equal to the sum of absolute values of all coordinates of all integer points which lie inside or on the surface of the sphere, when the center of the sphere is exactly in the center of coordinates. The sum has to be entered modulo $10^9 + 7$.

An integer point in a $d$-dimensional Euclidean space is a point which all $d$ coordinates are integers.

The Cabinet manager is planning to obtain more spheres in the future, and you know that calculations which help to unlock some high-dimensional spheres may be quite tedious to perform by hand.

Write a program that calculates the value necessary to unlock a cupboard with a sphere in the cabinet.

The input contains two integers $D, R$ ($1 \leq D \leq 50, 1 \leq R \leq 50$), the dimension and the radius of the sphere inside a cupboard.

Print the value which unlocks the cupboard with the given sphere, modulo $10^9 + 7$.

Input

The input contains two integers $D, R$ ($1 \leq D \leq 50, 1 \leq R \leq 50$), the dimension and the radius of the sphere inside a cupboard.

Output

Print the value which unlocks the cupboard with the given sphere, modulo $10^9 + 7$.

1 6
3 5
42
2850