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

~/algor $ cat problems/togri-tortburchak

Rectangle

Easy 1000 ms 64 MB 7%
Share

The sides of a rectangle $a$ and $b$ are given. Find its perimeter $P$ and area $S$:

$$P = 2 * (a + b), \qquad S = a * b$$

A rectangle with sides a and b

Input

One line with two positive integers: $a$ and $b$.

Output

One line with two integers: $P$ and $S$.

Note

$1 \le a, b \le 10^{9}$

Examples

Input #1
3 4
Output #1
14 12
Input #2
1 1
Output #2
4 1

Sign in to submit a solution

Signing up is free and takes a minute.