#K60232. Marble Collection

    ID: 31041 Type: Default 1000ms 256MiB

Marble Collection

Marble Collection

You are given an integer n which represents the number of days. There are two jars:

  • Jar A: On the i-th day, i marbles are added.
  • Jar B: On the i-th day, i^2 marbles are added.

Your task is to calculate and output the total number of marbles in Jar A and Jar B after n days.

The answer should be printed as two integers separated by a space.

Note: Use LaTeX format for any mathematical formulas. For example, the sum of the first n natural numbers is given by $\frac{n(n+1)}{2}$ and the sum of squares is given by $\frac{n(n+1)(2n+1)}{6}$.

inputFormat

An integer n representing the number of days.

outputFormat

Two integers separated by a single space. The first integer is the total number of marbles in Jar A, and the second integer is the total number in Jar B.## sample

0
0 0

</p>