Under construction

Still being built. Things may change

Addition and Multiplication

Time limit1sMemory limit128 MB

Summary
For integers a < b, multiply the triangular numbers T(k)=1+2+...+k for k from a to b, and print the result modulo 14579.
Level

Easy3 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

Namgyu recently learned addition and multiplication. Dohyun doubts that he learned them properly, so he made up a problem.

Given two integers aa and bb with 1≤a<b≤10001 \le a < b \le 1000, compute the following value.

(1+2+⋯+a)×(1+2+⋯+(a+1))×⋯×(1+2+⋯+(b−1))×(1+2+⋯+b)(1+2+\cdots+a) \times (1+2+\cdots+(a+1)) \times \cdots \times (1+2+\cdots+(b-1)) \times (1+2+\cdots+b)

For every integer kk from aa to bb, take the sum of the integers from 11 to kk, then multiply all of those sums together.

Namgyu cannot work this value out on his own. Write the program that computes it for him.

Input

The first line contains two integers aa and bb separated by a space. (1≤a<b≤10001 \le a < b \le 1000)

Output

Print the value of the expression above. The result can get very large, so print it modulo 1457914579.

Examples4

  1. Example 1

    Input
    3 5
    
    Expected output
    900
    
  2. Example 2

    Input
    1 2
    
    Expected output
    3
    
  3. Example 3

    Input
    1 3
    
    Expected output
    18
    
  4. Example 4

    Input
    1 1000
    
    Expected output
    0