SP18186 MACHMAY - Machine Mayhem

Description

It's the year 4224 and Giant Machine Corporation has started working on it’s 42nd Generation Robots. These robots are designed to have peculiar specifications. The company has **N** different parts (numbered from **1 to N**), each of which impart a very specific property to the robot. The formation of a single robot **R** consists of **M** steps. At the **i $ ^{th} $** step, one of the **N** parts is chosen and added to the current robot. After the **M $ ^{th} $** step, the robot is ready. Let **num(i, j)** be the count of part number **j** till the **i $ ^{th} $** step used for making the robot **R**. The 41st Generation Robots were found to be defective in the sense that one of their properties overshadowed their other properties significantly. Hence, for the 42nd Generation, it was decided that for any robot **R**, **|num(i, j) – num(i, k)| for every **1 and for every pair of **j, k** where **1 .****** Now, the Giant Machine Corporation is interested to know the number of different 42nd Generation Robots that they can make which satisfy the above criteria and hence they have hired you for the task. Since, this number can be very large, output the result modulo **10^9 + 7**. **Note** : Two robots **R1** and **R2** are considered different, if a different part is used in any of the corresponding **i** steps out of **M** steps.

Input Format

N/A

Output Format

N/A