import java.io.PrintStream; import java.util.Scanner; public class overlapingmaps_artur { public static void main(String[] args) { Scanner in = new Scanner(System.in); PrintStream out = System.out; while (true) { int w = in.nextInt(); int h = in.nextInt(); int x = in.nextInt(); int y = in.nextInt(); int s = in.nextInt(); int r = in.nextInt(); if (w == 0 && h == 0 && x == 0 && y == 0 && s == 0 && r == 0) break; // Rotation*Scaling*point + Translation = point // [cosa -sina] [s*px] + [x] = [px] // [sina cosa] [s*py] + [y] = [py] double angle = r * Math.PI / 180.0; double cos = Math.cos(angle); double sin = Math.sin(angle); double scale = s / 100.0; double a = scale * cos - 1; double b = -scale * sin; double c = scale * sin; double d = scale * cos - 1; double det = a * d - b * c; double p = (d * x - b * y) / -det; double q = (-c * x + a * y) / -det; out.printf("%.2f %.2f\n", p, q); } } }