#30Easy
Rectangle from two corners
Time: 1 s · Memory: 256 MB
- Arithmetic
Statement
The sides of a rectangle are parallel to the coordinate axes. Two of its opposite corners are given: and . Find the perimeter and the area of the rectangle.
Input format
A single line with four integers , , , (each at most in absolute value, , ).
Output format
A single line with two integers: the perimeter and the area.
Examples
Input
1 1 4 3
Output
10 6
Input
-2 5 3 -1
Output
22 30
Note
The side lengths are the absolute differences of the coordinates: and . The corners may come in any order, so a length must stay positive even when the difference is negative.
