#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 */
scalar_t__ EOF;
int acos(int);
int atan(double);
int /*<<< orphan*/ printf(char *, double, double);
scalar_t__ scanf(char *, double *, double *, double *, double *, double *);
double sqrt(double);
int main() {
  double a, b, s, m, n;
  double angle, velocity;
  while (scanf("%lf%lf%lf%lf%lf", &a, &b, &s, &m, &n) != EOF) {
    if (a == 0 && b == 0 && s == 0 && m == 0 && n == 0)
      break;
    angle = atan((b * n) / (a * m)) * 180 / acos(-1);
    velocity = sqrt(b * n * b * n + a * m * a * m) / s;
    printf("%.2lf %.2lf\n", angle, velocity);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
lea    -0x28(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1060 <scanf@plt>
mov    0x2e62(%rip),%rcx
cmp    (%rcx),%rax
je     12a7 <main+0x157>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <main+0xbc>
jp     120c <main+0xbc>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <main+0xbc>
jp     120c <main+0xbc>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <main+0xbc>
jp     120c <main+0xbc>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <main+0xbc>
jp     120c <main+0xbc>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120c <main+0xbc>
jp     120c <main+0xbc>
jmp    12a7 <main+0x157>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <atan@plt>
imul   $0xb4,%eax,%eax
mov    %eax,-0x44(%rbp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xd73(%rip),%rdi
call   1030 <printf@plt>
jmp    115f <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    $0x28,%rsp
lea    0xe9b(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
call   1060 <scanf@plt>
mov    0x2e60(%rip),%r13
cmp    0x0(%r13),%rax
jne    119f <main+0x4f>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xorpd  %xmm5,%xmm5
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbp
mov    %rsp,%r14
jmp    120c <main+0xbc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1070 <sqrt@plt>
movapd %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
divsd  0x10(%rsp),%xmm1
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
lea    0xe16(%rip),%rdi
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
mov    %r12,%rcx
mov    %rbp,%r8
mov    %r14,%r9
call   1060 <scanf@plt>
cmp    0x0(%r13),%rax
xorpd  %xmm5,%xmm5
je     118e <main+0x3e>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm5,%xmm1
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movsd  (%rsp),%xmm3
jne    1255 <main+0x105>
jp     1255 <main+0x105>
ucomisd %xmm5,%xmm0
jne    1255 <main+0x105>
jp     1255 <main+0x105>
movsd  0x10(%rsp),%xmm4
ucomisd %xmm5,%xmm4
jne    1255 <main+0x105>
jp     1255 <main+0x105>
ucomisd %xmm5,%xmm2
jne    1255 <main+0x105>
jp     1255 <main+0x105>
ucomisd %xmm5,%xmm3
jne    1255 <main+0x105>
jnp    118e <main+0x3e>
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1050 <atan@plt>
imul   $0xb4,%eax,%ebx
mov    $0xffffffff,%edi
call   1040 <acos@plt>
xorpd  %xmm5,%xmm5
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
mov    %eax,%r15d
movsd  0x18(%rsp),%xmm1
movsd  (%rsp),%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x8(%rsp),%xmm3
movapd %xmm1,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm2,%xmm0
addsd  %xmm4,%xmm0
ucomisd %xmm5,%xmm0
jb     11c0 <main+0x70>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    11c9 <main+0x79>

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

LLVM IR (-O2):
@.str = [16 x i8] c"%lf%lf%lf%lf%lf\00"
@EOF = global i64 0
@.str.1 = [13 x i8] c"%.2lf %.2lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = bitcast double* %1 to i8*
%7 = bitcast double* %2 to i8*
%8 = bitcast double* %3 to i8*
%9 = bitcast double* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = call i64 @scanf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5)
%12 = load i64, i64* @EOF
%13 = icmp eq i64 %11, %12
br i1 %13, label %55, label %14
14: ; preds = %0, %29
%15 = load double, double* %1
%16 = fcmp oeq double %15, 0.000000e+00
%17 = load double, double* %2
%18 = fcmp oeq double %17, 0.000000e+00
%19 = select i1 %16, i1 %18, i1 false
%20 = load double, double* %3
%21 = fcmp oeq double %20, 0.000000e+00
%22 = select i1 %19, i1 %21, i1 false
%23 = load double, double* %4
%24 = fcmp oeq double %23, 0.000000e+00
%25 = select i1 %22, i1 %24, i1 false
%26 = load double, double* %5
%27 = fcmp oeq double %26, 0.000000e+00
%28 = select i1 %25, i1 %27, i1 false
br i1 %28, label %55, label %29
29: ; preds = %14
%30 = fmul double %17, %26
%31 = fmul double %15, %23
%32 = fdiv double %30, %31
%33 = call i32 @atan(double %32)
%34 = mul nsw i32 %33, 180
%35 = call i32 @acos(i32 -1)
%36 = sdiv i32 %34, %35
%37 = sitofp i32 %36 to double
%38 = load double, double* %2
%39 = load double, double* %5
%40 = fmul double %38, %39
%41 = fmul double %38, %40
%42 = load double, double* %1
%43 = load double, double* %4
%44 = fmul double %42, %43
%45 = fmul double %42, %44
%46 = fmul double %43, %45
%47 = call double @llvm.fmuladd.f64(double %41, double %39, double %46)
%48 = call double @sqrt(double %47)
%49 = load double, double* %3
%50 = fdiv double %48, %49
%51 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %37, double %50)
%52 = call i64 @scanf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3, double* %4, double* %5)
%53 = load i64, i64* @EOF
%54 = icmp eq i64 %52, %53
br i1 %54, label %55, label %14
55: ; preds = %29, %14, %0
ret i32 0
}