import java.util.ArrayDeque; import java.util.Arrays; import java.util.Scanner; class Main { public static void main(String[] args) { new Main().run(); } double Z = 376.730313461; void run() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); double theta = sc.nextDouble(); double phi = sc.nextDouble(); double sigma = sc.nextDouble(); double pR = Z * sigma * Math.cos(theta) / (2 + Z * sigma * Math.cos(theta)) * Math.sin(phi); double pT = 2 / (2 + Z * sigma * Math.cos(theta)) * Math.sin(phi); double sR = Z * sigma / (2 * Math.cos(theta) + Z * sigma) * Math.cos(phi); double sT = 2 * Math.cos(theta) / (2 * Math.cos(theta) + Z * sigma) * Math.cos(phi); pR = Math.abs(pR); pT = Math.abs(pT); sR = Math.abs(sR); sT = Math.abs(sT); double[] pRT = calcRT(pR, pT, N); double[] sRT = calcRT(sR, sT, N); double R = pRT[0] * pRT[0] + sRT[0] * sRT[0]; double T = pRT[1] * pRT[1] + sRT[1] * sRT[1]; double A = 1 - R - T; if (A > 1 || A < 0) throw new AssertionError(); System.out.println(R + " " + T + " " + A); } double[] calcRT(double r, double t, int n) { double[] a = { r, t }; double[] ans = { 0, 1 }; for (; n > 0; n >>= 1, a = merge(a, a)) { if (n % 2 == 1) { ans = merge(ans, a); } } return ans; } double[] merge(double[] a, double[] b) { double[] ret = { a[0] + a[1] * a[1] * b[0] / (1 - a[0] * b[0]), a[1] * b[1] / (1 - a[0] * b[0]) }; return ret; } void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }