#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double atan(double);
int /*<<< orphan*/ printf(char *, double, double);
int scanf(char *, int *, int *, int *, int *, int *);
int sqrt(double);
int main() {
  int a, b;
  int s;
  int m, n;
  double hl, vl;
  double theta, v;
  while (scanf("%d%d%d%d%d", &a, &b, &s, &m, &n), a || b || s || m || n) {
    vl = (double)n * (double)b;
    hl = (double)m * (double)a;
    v = sqrt(vl * vl + hl * hl) / s;
    theta = atan(vl / hl) / (4.0 * atan(1.0)) * 180.0;
    printf("%.2lf %.2lf\n", theta, v);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
lea    -0x18(%rbp),%r9
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x39(%rbp)
jne    11b5 <main+0x75>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x39(%rbp)
jne    11b5 <main+0x75>
mov    $0x1,%al
cmpl   $0x0,-0x10(%rbp)
mov    %al,-0x39(%rbp)
jne    11b5 <main+0x75>
mov    $0x1,%al
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x39(%rbp)
jne    11b5 <main+0x75>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    11c5 <main+0x85>
jmp    127e <main+0x13e>
cvtsi2sdl -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
cltd
idivl  -0x10(%rbp)
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1040 <atan@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  0xddb(%rip),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  0xdbe(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0xda6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
lea    0xdaf(%rip),%rdi
call   1030 <printf@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0x24(%rsp),%r15
lea    0x20(%rsp),%r12
lea    0xc(%rsp),%r13
lea    0x1c(%rsp),%rbx
lea    0x18(%rsp),%rbp
lea    0xeb5(%rip),%r14
jmp    121f <main+0xdf>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x28(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
mulsd  %xmm1,%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
cltd
idivl  0xc(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x28(%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
call   1040 <atan@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xe0a(%rip),%xmm0
call   1040 <atan@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xdff(%rip),%xmm0
mulsd  0xdff(%rip),%xmm0
mov    %r14,%rdi
movsd  0x30(%rsp),%xmm1
call   1030 <printf@plt>
lea    0xdf2(%rip),%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    %rbp,%r9
call   1050 <scanf@plt>
mov    0x24(%rsp),%eax
mov    0x20(%rsp),%edx
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%esi
test   %eax,%eax
jne    1180 <main+0x40>
test   %edx,%edx
jne    1180 <main+0x40>
cmpl   $0x0,0xc(%rsp)
jne    1180 <main+0x40>
test   %ecx,%ecx
jne    1180 <main+0x40>
test   %esi,%esi
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d%d%d%d%d\00"
@.str.1 = [13 x i8] c"%.2lf %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 0, i32* %1
br label %11
11: ; preds = %29, %0
%12 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4, i32* %5, i32* %6)
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 0
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %27, label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br i1 %20, label %27, label %21
21: ; preds = %18
%22 = load i32, i32* %5
%23 = icmp ne i32 %22, 0
br i1 %23, label %27, label %24
24: ; preds = %21
%25 = load i32, i32* %6
%26 = icmp ne i32 %25, 0
br label %27
27: ; preds = %24, %21, %18, %15, %11
%28 = phi i1 [ true, %21 ], [ true, %18 ], [ true, %15 ], [ true, %11 ], [ %26, %24 ]
br i1 %28, label %29, label %61
29: ; preds = %27
%30 = load i32, i32* %6
%31 = sitofp i32 %30 to double
%32 = load i32, i32* %3
%33 = sitofp i32 %32 to double
%34 = fmul double %31, %33
store double %34, double* %8
%35 = load i32, i32* %5
%36 = sitofp i32 %35 to double
%37 = load i32, i32* %2
%38 = sitofp i32 %37 to double
%39 = fmul double %36, %38
store double %39, double* %7
%40 = load double, double* %8
%41 = load double, double* %8
%42 = load double, double* %7
%43 = load double, double* %7
%44 = fmul double %42, %43
%45 = call double @llvm.fmuladd.f64(double %40, double %41, double %44)
%46 = call i32 @sqrt(double %45)
%47 = load i32, i32* %4
%48 = sdiv i32 %46, %47
%49 = sitofp i32 %48 to double
store double %49, double* %10
%50 = load double, double* %8
%51 = load double, double* %7
%52 = fdiv double %50, %51
%53 = call double @atan(double %52)
%54 = call double @atan(double 1.000000e+00)
%55 = fmul double 4.000000e+00, %54
%56 = fdiv double %53, %55
%57 = fmul double %56, 1.800000e+02
store double %57, double* %9
%58 = load double, double* %9
%59 = load double, double* %10
%60 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %58, double %59)
br label %11
61: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d%d%d%d%d\00"
@.str.1 = [13 x i8] c"%.2lf %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
br label %11
11: ; preds = %27, %0
%12 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4, i32* %5)
%13 = load i32, i32* %1
%14 = icmp ne i32 %13, 0
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 0
%17 = select i1 %14, i1 true, i1 %16
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
%20 = select i1 %17, i1 true, i1 %19
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 0
%23 = select i1 %20, i1 true, i1 %22
%24 = load i32, i32* %5
%25 = icmp ne i32 %24, 0
%26 = select i1 %23, i1 true, i1 %25
br i1 %26, label %27, label %46
27: ; preds = %11
%28 = sitofp i32 %24 to double
%29 = sitofp i32 %15 to double
%30 = fmul double %29, %28
%31 = sitofp i32 %21 to double
%32 = sitofp i32 %13 to double
%33 = fmul double %32, %31
%34 = fmul double %33, %33
%35 = call double @llvm.fmuladd.f64(double %30, double %30, double %34)
%36 = call i32 @sqrt(double %35)
%37 = load i32, i32* %3
%38 = sdiv i32 %36, %37
%39 = sitofp i32 %38 to double
%40 = fdiv double %30, %33
%41 = call double @atan(double %40)
%42 = call double @atan(double 1.000000e+00)
%43 = fdiv double %41, 0x400921FB54442D18
%44 = fmul double %43, 1.800000e+02
%45 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %44, double %39)
br label %11
46: ; preds = %11
ret i32 0
}