nocriz is a student who, like many, has a dream for his life. Unfortunately, life isn't always easy and there are times when the dream seems faraway and the pursuit feels difficult.
Reality often drives people away from their pursuit of dreams to settle for what they have at hand. Lured to set aside the struggle, nocriz said to Artemisia, "But I shouldn't give up the dream, right?". Artemisia replied: "Of course one should not give up the dream easily! Struggle, struggle until crushed by the rock!".
That night, nocriz had a very bad dream. In his dream there was a rock in the shape of an ellipse, and he was asked to calculate the value $\sum (x \oplus y)^3x^{-2}y^{-1} \mod 10^9+7$ for all integer points $(x,y)$ in the ellipse, where $\oplus$ is the bitwise XOR operation.
In more formal words, you are given integers $a,b,c,d,e,f$, and you are required to calculate $\sum_{(x,y) \in E} (x \oplus y)^3x^{-2}y^{-1} \mod 10^9+7$ where $E = \{(x,y)| x,y \in \mathbb{Z},a(x-b)^2+c(y-d)^2+e(x-b)(y-d) \le f\}$. It is guaranteed that all such points satisfy $0 < x,y < 4 \times 10^6$ and that the ellipse contains at least one integer point.
nocriz was not crushed by the rock that day. Can you solve this problem, like nocriz did?