Given an n × m chess board, you can place on it as many black knights as you wish, as long as no two knights threaten each other. How many possibilities do you have?
For instance, these are just four of the 278 possibilities for n = 3 and m = 4:
Input
Input consists of several cases, each with n and m. Assume 1 ≤ n ≤ 4 and 1 ≤ m ≤ 1015.
Output
For every case, print the number of possibilities modulo 108 + 7.
Input
1 1 1 10 2 1 3 4 4 2 4 10 4 1000000000000000
Output
2 1024 4 278 81 18702843 51397909