Problems
Sum of squares
Sum of squares
For given integers n and m find the sum of squares of all integers, located between n and m inclusively. Print the answer modulo 109
+ 9.
Input
Two integers n and m (-1017
≤ n, m ≤ 1017
).
Output
Print the sum of squares of all integers between n and m inclusively.
Input example #1
1 1
Output example #1
1
Input example #2
2 -2
Output example #2
10