import java.util.Scanner;
//保留小数位数String.format()
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
float h=scanner.nextFloat();
int n =scanner.nextInt();
//write your code here......
float sum = h;
h /= 2;
for(int i = 0; i < n - 1; i++){
sum += 2 * h;
h /= 2;
}
System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));
//注意这个保留小数位数的函数,以后可能会用得到;String.format("%.3f" , _ ).
//输出格式为:System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum));
}
}