import java.util.Scanner;
public class SphereWeight {
public static void main(String[] args) {
final double PI = 3.1415926;
final double IRON_SPECIFIC_GRAVITY = 7.86;
final double GOLD_SPECIFIC_GRAVITY = 19.3;
Scanner scanner = new Scanner(System.in);
int ironDiameter = scanner.nextInt();
int goldDiameter = scanner.nextInt();
scanner.close();
double ironDiameterCm = ironDiameter / 10.0;
double goldDiameterCm = goldDiameter / 10.0;
double ironRadius = ironDiameterCm / 2;
double goldRadius = goldDiameterCm / 2;
double ironVolume = (4.0 / 3) * PI * Math.pow(ironRadius, 3);
double goldVolume = (4.0 / 3) * PI * Math.pow(goldRadius, 3);
double ironMass = ironVolume * IRON_SPECIFIC_GRAVITY;
double goldMass = goldVolume * GOLD_SPECIFIC_GRAVITY;
System.out.printf("%.3f %.3f", ironMass, goldMass);
}
}