Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/begin-silindr

Cylinder

Easy 1000 ms 64 MB 14%
Share

The base radius $r$ and height $h$ of a cylinder are given. Find its volume $V$ and total surface area $S$ (the total surface is the two bases plus the lateral surface):

$$V = \pi * r^{2} * h, \qquad S = 2 * \pi * r * (r + h)$$

Use $\pi = 3.141592653589793$.

A cylinder: base radius r, height h

Input

One line with two positive integers: $r$ and $h$.

Output

One line with two numbers: $V$ and $S$, each with exactly 2 digits after the decimal point (for example, 3.14).

Note

$1 \le r, h \le 1000$

Examples

Input #1
1 1
Output #1
3.14 12.57
Input #2
2 5
Output #2
62.83 87.96

Sign in to submit a solution

Signing up is free and takes a minute.