#abc145d. [abc145_d]Knight
[abc145_d]Knight
Problem Statement
There is a knight - the chess piece - at the origin of a two-dimensional grid.
When the knight is at the square , it can be moved to either or .
In how many ways can the knight reach the square ?
Find the number of ways modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of ways for the knight to reach from , modulo .
Sample Input 1
3 3
Sample Output 1
2
There are two ways: and .
Sample Input 2
2 2
Sample Output 2
0
The knight cannot reach .
Sample Input 3
999999 999999
Sample Output 3
151840682
Print the number of ways modulo .