How many triple of points \(A(x_A, y_A), B(x_B, y_B), C(x_C, y_C)\) which:
\(x_A, y_A, x_B, y_B, x_C, y_C \in \mathbb{Z}\)
\(0 \leq x_A, x_B, x_C < n, 0 \leq y_A, y_B, y_C < m\)
\(S_{\triangle ABC} \not\in \mathbb{Z}\)? (\(S_\triangle\) denotes the area of triangle)
Two integers \(n\) and \(m\).
(\(1 \leq n, m \leq 10^9\))
The only integer denotes the number possible triples, modulo \(10^9 + 7\).
2 2
24
There are \(4\) triangles. Each of them is counted \(6\) times.