While Jonathan was doing his math homework, he found a multiple-choice question:
Given a cuboid with each edge parallel to the coordinate axis, two vertexes of which are (0,0,0) and (a,b,c), and a plane Ax + By + Cz + D = 0 which intersects the cuboid. You are asked to calculate the number of edges of the cross section. Four options are provided: A. three, B. four, C. five and D. six.
Unfortunately, the number D has been covered by black ink so Jonathan didn’t know what exactly it is. Therefore, D couldbe the anyreal number satisfyingthe plane intersectsthe cuboid in equal probability.
Then Jonathan found some options had significantly greater probability to be the correct answer in some cases. For example, if the cuboid is (0,0,0),(1,1,1) and the plane is x+y+D = 0, then the option B has the 100% probability to be the right answer. Therefore, he wanted to know each option’s probability to be the correct answer in normal cases. As the problem is too hard for him, please help him to calculate the answer.
We can prove that the probability of each option is a rational number. Let’s denote it by irreducible fraction Q/P, you are only to print the value Q$\times P^{-1}$ mod $10^9$ + 7. Here $P^{-1}$ is multiplicative inverse of P modulo $10^9$ + 7.