First Dylans is given $N$ points $(x_i,y_i)$ in Rectangular Plane Coordinate System.
It guarantees that each $x$ is different.
And there are $Q$ questions.Each question are three numbers:$(L,R,x)$.
His task is to make up a polynomial that its highest coefficient is equal to $(R-L)$.
To check his polynomial,he needs to print the value($y$)of the polynomial by $x$.
Because the value and the pair of points can be very huge,so each calculate must mod $1000000007$.
All points and number $x$ in query are positive integers and not bigger than $250000$.
$2 \leq N \leq 3000,1 \leq Q \leq 3000, 1 \leq L,R \leq N,R>L$