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

~/algor $ cat problems/begin-erkin-tushish

Free fall

Easy 1000 ms 64 MB 15%
Share

A body falls from a height of $h$ metres with no initial speed (air resistance is ignored). After how many seconds ($t$) does it hit the ground, and what is its speed $v$ (m/s) at impact?

$$t = \sqrt{\frac{2 * h}{g}}, \qquad v = g * t$$

Free-fall acceleration $g = 9.8$.

A body falls from height h with acceleration g; it hits the ground after time t at speed v

Input

One positive integer $h$.

Output

One line with two numbers: $t$ and $v$, each with exactly 2 digits after the decimal point (for example, 2.02).

Note

$1 \le h \le 10^{5}$

Examples

Input #1
20
Output #1
2.02 19.80
Input #2
490
Output #2
10.00 98.00

Sign in to submit a solution

Signing up is free and takes a minute.