import java.util.*;
import java.math.*;
class Main
{
public static void main
(String[] args
) {
Scanner in
= new Scanner
(System.
in); double s1, s2, n, x;
n = in.nextDouble();
s1 = 4*x; //Длина пути по дороге
s2
= Math.
sqrt(2*(n
*n
- 4*x
*n
+ 8*x
*x
)); //Длина пути напрямик System.
out.
print(s1
+ " " + s2
); }
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5tYXRoLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKQoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCWRvdWJsZSBzMSwgczIsIG4sIHg7CgkJbiA9IGluLm5leHREb3VibGUoKTsKCQl4ID0gbiooNS1NYXRoLnNxcnQoMyktTWF0aC5zcXJ0KDYqTWF0aC5zcXJ0KDMpLTQpKS8oOCooMi1NYXRoLnNxcnQoMykpKTsKCQlzMSA9IDQqeDsgLy/QlNC70LjQvdCwINC/0YPRgtC4INC/0L4g0LTQvtGA0L7Qs9C1CgkJczIgPSBNYXRoLnNxcnQoMioobipuIC0gNCp4Km4gKyA4KngqeCkpOyAvL9CU0LvQuNC90LAg0L/Rg9GC0Lgg0L3QsNC/0YDRj9C80LjQugoJCVN5c3RlbS5vdXQucHJpbnQoczEgKyAiICIgKyBzMik7Cgl9Cn0=