CF295D Greg and Caves
Description
Greg has a pad. The pad's screen is an $ n×m $ rectangle, each cell can be either black or white. We'll consider the pad rows to be numbered with integers from 1 to $ n $ from top to bottom. Similarly, the pad's columns are numbered with integers from 1 to $ m $ from left to right.
Greg thinks that the pad's screen displays a cave if the following conditions hold:
- There is a segment $ [l,r] $ $ (1
Input Format
The first line contains two integers $ n $ , $ m $ — the pad's screen size $ (1
Output Format
In the single line print the remainder after dividing the answer to the problem by $ 1000000007 $ $ (10^{9}+7) $ .