Binary matrix - MarisaOJ: Marisa Online Judge

Binary matrix

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of binary matrices having $n$ rows and $m$ columns that each row has at least one number $1$ and each column has at least one number $0$. ### Input - A single line contains 2 integers $n, m$. ### Output - Print the answer, modulo $10^9+7$. ### Constraints - $1 \le n, m \le 10^9$. ### Example Input: ``` 2 3 ``` Output: ``` 12 ```