Mr. Panda likes creating and solving mathematical puzzles. One day, Mr. Panda came up with a puzzle while he was playing the following game with Mrs. Panda:
In a plane, there are M points $(0,0),(1,0), ..,(M-2,0),(M-1,0)$ in a segment. You are also given $N$ circles, the radius of $i^{th}$ circle is $R_i$. In the game, you are allowed to put center of any circle into one of the $M$ points without making circles overlap (that is, if the intersection of their circles has a positive area).
An arrangement of circles is considered as valid if every circle’s center is in one of the $M$ points. Mr. Panda wanted to know length of empty units which are not covered by any circle in the segment from $(0,0)$ to $(M-1,0)$.
Because there are too many arrangements, Mr. Panda only wanted to know $\sum L_i^2$ modulo $1,000,000,007$ where $L_i$ is length of empty units in the $i^{th}$ arrangement.
The puzzle has confused Mr. Panda for a long time. Luckily, Mr. Panda knows you are in this contest. Could you help Mr. Panda’s solve the puzzle?