You are given four different types of gems that are denoted by , , , and . Their quantity is given by , , , and respectively. You are required to arrange these gems in a straight line next to each other. However, in this arrangement, you want no two gems of the same type to be adjacent to each other.
Your task is to determine the number of distinct arrangements of the gems that exist. If yes, print the answer modulo
Input format
The only line of the input contains four integers denoting the number of available gems of each type.
Output format
Print the required answer modulo .
Constraints
There are two ways to arrange gems :