import java.util.*; import java.io.*; //comment out when submitting public class e { public static void main(String[] args) { Scanner in = new Scanner(System.in); //Scanner in = null; //comment out this part //try { // File file = new File("input.txt"); // in = new Scanner(file); //} catch(FileNotFoundException e) { // System.out.println("error"); //} int n = in.nextInt(); double p = in.nextDouble(); double s = in.nextDouble(); double v = in.nextDouble(); double c = findC(n, p, s, v); System.out.println(getRunningTime(c, n, p, s, v) + " " + c); } public static double findC(int n, double p, double s, double v) { double left = 0; double right = 100; while(true) { if(Math.abs(right-left) <= Math.pow(10, -6)) { return (right + left)/2; } double leftThird = left + (right - left)/3; double rightThird = right - (right - left)/3; if(getRunningTime(leftThird, n, p, s, v) < getRunningTime(rightThird, n, p, s, v)) { right = rightThird; } else { left = leftThird; } } } public static double getRunningTime(double c, int n, double p, double s, double v) { return (n * Math.pow(Math.log(n)/Math.log(2), c * Math.sqrt(2)))/(p*Math.pow(10, 9)) + s*(1+1/c)/v; } }