Problem list
Log in
#r02983 · Online Judge > GoldOJ

Rectangle Area and Perimeter

Bronze IV 1.0 s 256 MB

Given a rectangle's height $h$ and width $w$, print its area $h \cdot w$ on the first line and its perimeter $2(h + w)$ on the second.

Input

Two integers $h$ and $w$ ($1 \le h, w \le 10^9$).

Output

Print the area, then the perimeter.

Example 1

Input
3 5
Output
15
16
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code