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(); //write your code here...... double sum=0.0; while(n>0) { h=h/2; sum=sum+h*3; n--; } System.out.println(String.format("%.3f", h)+" "+String.format("%.3f", sum-h)); } }