P27930 [洛谷] [Luogu 202406GESP Simulation Level 2] Perimeter and Area Calculation
普及-
题目描述

Problem Description

Xiao Lu has \( n \) squares, where the side length of the first square is 1, the side length of the second square is 2, and so on, with the side length of the \( n \)-th square being \( n \). These squares are tightly arranged in a row. Xiao Lu wants to know the perimeter and area of this pattern.

For example, when \( n = 5 \), the pattern looks like the following image. The red border represents the perimeter of the entire pattern, and the green area represents the area of the entire pattern:

Input Format

Input consists of a single positive integer \( n \).

Output Format

Output two lines.

The first line contains a positive integer representing the perimeter of the pattern.

The second line contains a positive integer representing the area of the pattern.

Sample Input and Output

Sample Input #1

5

Sample Output #1

40
55

Sample Input #2

9

Sample Output #2

108
285

Notes

For 70% of the test cases, \( 1 \leq n \leq 100 \).

For all test cases, \( 1 \leq n \leq 100000 \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5
样例输出
40 55