import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        float h=scanner.nextFloat();
        int n =scanner.nextInt();
        double _h=h/Math.pow(2,n);
        double s=4*h*(Math.pow(2,n)-1)/Math.pow(2,n)-h;
        System.out.printf("%.3f %.3f",_h,s);
    }
}

通过计算可知路程为,第n次反弹的高度为