Taxicab Geometry

Time limit1sMemory limit128 MB

Summary
Given radius R, compute and print the area of a Euclidean circle and a taxicab-metric circle.
Level

Easy1 of 10

Topics
Math, Geometry, Implementation
Solved
No attempts yet

Problem

In the 19th century, German mathematician Hermann Minkowski introduced taxicab geometry, a form of non-Euclidean geometry.

In taxicab geometry, the distance between two points T1(x1, y1) and T2(x2, y2) is defined as follows.

D(T1, T2) = |x1 - x2| + |y1 - y2|

Except for the distance between two points, all other definitions are the same as in Euclidean geometry. Therefore, a circle in taxicab geometry is also defined as follows.

Circle: the set of all points in a plane that are at a constant distance from a fixed point

Given a radius R, write a program that computes the area of a circle in Euclidean geometry and the area of a circle in taxicab geometry.

Input

The first line contains the radius R. R is a natural number not greater than 10,000.

Output

On the first line, print the area of a circle with radius R in Euclidean geometry.

On the second line, print the area of a circle with radius R in taxicab geometry.

An absolute or relative error up to 0.0001 is accepted.

Hint

Examples3

  1. Example 1

    Input
    1
    
    Expected output
    3.141593
    2.000000
    
  2. Example 2

    Input
    21
    
    Expected output
    1385.442360
    882.000000
    
  3. Example 3

    Input
    42
    
    Expected output
    5541.769441
    3528.000000