A - Simple Math Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 300

問題文

3 つの正整数 A, B, C が与えられます。

\sum_{a=1}^{A} \sum_{b=1}^{B} \sum_{c=1}^{C} abc

998244353 で割った余りを求めてください。

制約

  • 1 \leq A, B, C \leq 10^9

入力

入力は以下の形式で標準入力から与えられる。

A B C

出力

求めた値を 998244353 で割った余りを出力せよ。


入力例 1

1 2 3

出力例 1

18

(1 \times 1 \times 1) + (1 \times 1 \times 2) + (1 \times 1 \times 3) + (1 \times 2 \times 1) + (1 \times 2 \times 2) + (1 \times 2 \times 3) = 1 + 2 + 3 + 2 + 4 + 6 = 18 となります。


入力例 2

1000000000 987654321 123456789

出力例 2

951633476

998244353 で割った余りを求めることに注意してください。

Score : 300 points

Problem Statement

Given are three positive integers A, B, and C. Compute the following value modulo 998244353:

\sum_{a=1}^{A} \sum_{b=1}^{B} \sum_{c=1}^{C} abc

Constraints

  • 1 \leq A, B, C \leq 10^9

Input

Input is given from standard input in the following format:

A B C

Output

Print the value modulo 998244353.


Sample Input 1

1 2 3

Sample Output 1

18

We have: (1 \times 1 \times 1) + (1 \times 1 \times 2) + (1 \times 1 \times 3) + (1 \times 2 \times 1) + (1 \times 2 \times 2) + (1 \times 2 \times 3) = 1 + 2 + 3 + 2 + 4 + 6 = 18.


Sample Input 2

1000000000 987654321 123456789

Sample Output 2

951633476

Be sure to compute the value modulo 998244353.