Problem K
Háhýsi
Languages
en
is
Input
The first and only line of the input is the length and width of the site, $n$ and $m$, separated by a space. It is guaranteed that $1 \leq n, m \leq 10^{18}$.
Output
Print the number of possible locations for the skyscraper. Since the answer could be very large you should print the remainder of the answer when it is divided by $10^9 + 7$. For example if there are $1\, 000\, 203\, 876$ possible locations, you should print $203\, 869$.
Scoring
Group |
Points |
Scoring |
1 |
10 |
$1 \leq n, m \leq 7$ |
2 |
10 |
$1 \leq n, m \leq 50$ |
3 |
20 |
$1 \leq n, m \leq 200$ |
4 |
20 |
$1 \leq n, m \leq 2\, 000$ |
5 |
20 |
$1 \leq n, m \leq 10^6$ |
6 |
20 |
$1 \leq n, m \leq 10^{18}$ |
Sample Input 1 | Sample Output 1 |
---|---|
2 2 |
1 |
Sample Input 2 | Sample Output 2 |
---|---|
3 4 |
18 |