import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.Scanner;
class Ideone
{
{
double s1, s2, n, x;
Scanner in
= new Scanner
(System.
in); n
= Double.
parseDouble(in.
nextLine()); x
= n
* (5 - Math.
sqrt(3) - Math.
sqrt(6 * Math.
sqrt(3) - 4))/(8 * (2 - Math.
sqrt(3))); s1 = 4 * x; //Длина пути по дороге
s2
= Math.
sqrt(2 * (n
* n
- 4 * x
* n
+ 8 * x
* x
));//Длина пути напрямую System.
out.
println(s1
+ " " + s2
); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuU2Nhbm5lcjsKIApjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJZG91YmxlIHMxLCBzMiwgbiwgeDsKCQlTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKCQluID0gRG91YmxlLnBhcnNlRG91YmxlKGluLm5leHRMaW5lKCkpOwoJICAgIHggPSBuICogKDUgLSBNYXRoLnNxcnQoMykgLSBNYXRoLnNxcnQoNiAqIE1hdGguc3FydCgzKSAtIDQpKS8oOCAqICgyIC0gTWF0aC5zcXJ0KDMpKSk7CgkgICAgczEgPSA0ICogeDsgLy/QlNC70LjQvdCwINC/0YPRgtC4INC/0L4g0LTQvtGA0L7Qs9C1CgkgICAgczIgPSBNYXRoLnNxcnQoMiAqIChuICogbiAtIDQgKiB4ICogbiArIDggKiB4ICogeCkpOy8v0JTQu9C40L3QsCDQv9GD0YLQuCDQvdCw0L/RgNGP0LzRg9GOCgkgICAgU3lzdGVtLm91dC5wcmludGxuKHMxICsgIiAiICsgczIpOwoJfQp9