Problem: During their training for the ICPC competitions, team "Jee You See" stumbled upon a very basic counting problem. After many "Wrong answer" verdicts, they finally decided to give up and destroy turn-off the PC. Now they want your help in up-solving the problem.
You are given 4 integers , , , and . Count the number of arrays of length containing non-negative integers such that:
- , and
- , where denotes the bitwise XOR operation.
Since the answer can be large, print it modulo .
Input Format: The only line contains four integers , , , (, , ).
Output Format: Print the number of arrays satisfying all requirements modulo .
Note: The following arrays satisfy the conditions for the first sample:
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- ;
- .
The following arrays satisfy the conditions for the second sample:
- ;
- ;
- ;
- .