COCI 2006/2007, Contest #1

The 19th century German mathematician Hermann Minkowski investigated a non-Euclidian geometry, called the taxicab geometry. In taxicab geometry the distance between two points T1(x1, y1) and T2(x2, y2) is defined as:

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

All other definitions are the same as in Euclidian geometry, including that of a circle:

A circle is the set of all points in a plane at a fixed distance (the radius) from a fixed point (the centre of the circle).

We are interested in the difference of the areas of two circles with radius R, one of which is in normal (Euclidian) geometry, and the other in taxicab geometry. The burden of solving this difficult problem has fallen onto you.

Input

The first and only line of input will contain the radius R, an integer smaller than or equal to 10000.

Output

On the first line you should output the area of a circle with radius R in normal (Euclidian) geometry. On the second line you should output the area of a circle with radius R in taxicab geometry.

Note: Outputs within ±0.0001 of the official solution will be accepted.

```1
```

Output

```3.141593
2.000000
```

```21
```

Output

```1385.442360
882.000000
```

```42
```

Output

```5541.769441
3528.000000
```

Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

• (0/0)
My program seems to round numbers to 2 decimal places automatically, how can I fix that?

• (0/0)
Replace your print statement with something of the form

cout << fixed << setprecision(k) << ...

where k is the desired number of places after the decimal point.

• (0/0)
Would anybody mind me giving small hint to solve this.Just hint needed :) please

• (0/0)
Both numbers can be calculated by some formula.

• (2/0)
Area of circle in Euclidean Geometry : 3.14159*R*r
Are of circle in Taxicab Geometry: r*r*2
Well, it was easy to find the pattern.