#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 acos(double);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, double *, double *, double *);
double sqrt(int);
int main() {
  double R, x, y;
  while (scanf("%lf %lf %lf", &R, &x, &y) == 3) {
    double distance;
    if ((distance = x * x + y * y) >= R * R)
      printf("miss\n");
    else {
      distance = sqrt(distance);
      double h = R - distance;
      double segment_a =
          R * R * acos((R - h) / R) - (R - h) * sqrt(2 * R * h - h * h);
      double circle_a =
          3.1415926535897932384626433832795028841971693993751 * R * R;
      double remaining_a = circle_a - segment_a;
      if (remaining_a < segment_a)
        printf("%.7f %.7f\n", segment_a, remaining_a);
      else
        printf("%.7f %.7f\n", remaining_a, segment_a);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    1304 <main+0x1c4>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     11b8 <main+0x78>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12ff <main+0x1bf>
cvttsd2si -0x28(%rbp),%edi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1040 <acos@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xdf3(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sqrt@plt>
movsd  -0x60(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd6d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e2 <main+0x1a2>
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
lea    0xd4c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12fa <main+0x1ba>
movsd  -0x48(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
lea    0xd2f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    12ff <main+0x1bf>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x60,%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    0xea3(%rip),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1060 <scanf@plt>
cmp    $0x3,%eax
jne    12c4 <main+0x174>
lea    0xe8d(%rip),%r14
lea    0xe7a(%rip),%r15
mov    %rsp,%r12
lea    0x10(%rsp),%r13
lea    0x8(%rsp),%rbx
lea    0xe7d(%rip),%rbp
jmp    11d2 <main+0x82>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1060 <scanf@plt>
cmp    $0x3,%eax
jne    12c4 <main+0x174>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    11b0 <main+0x60>
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  (%rsp),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0x18(%rsp)
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm1
movsd  %xmm1,0x30(%rsp)
call   1050 <acos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm2
movsd  0x18(%rsp),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,0x20(%rsp)
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sqrt@plt>
movsd  0x28(%rsp),%xmm2
mulsd  0x20(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  (%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  0xd71(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm2,%xmm1
mov    %r14,%rdi
ucomisd %xmm1,%xmm2
jbe    12b0 <main+0x160>
movapd %xmm2,%xmm0
jmp    12b8 <main+0x168>
cs nopw 0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
mov    $0x2,%al
call   1040 <printf@plt>
jmp    11b8 <main+0x68>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.1 = [6 x i8] c"miss\0A\00"
@.str.2 = [11 x i8] c"%.7f %.7f\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
%9 = alloca double
store i32 0, i32* %1
br label %10
10: ; preds = %77, %0
%11 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%12 = icmp eq i32 %11, 3
br i1 %12, label %13, label %78
13: ; preds = %10
%14 = load double, double* %3
%15 = load double, double* %3
%16 = load double, double* %4
%17 = load double, double* %4
%18 = fmul double %16, %17
%19 = call double @llvm.fmuladd.f64(double %14, double %15, double %18)
store double %19, double* %5
%20 = load double, double* %2
%21 = load double, double* %2
%22 = fmul double %20, %21
%23 = fcmp oge double %19, %22
br i1 %23, label %24, label %26
24: ; preds = %13
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %77
26: ; preds = %13
%27 = load double, double* %5
%28 = fptosi double %27 to i32
%29 = call double @sqrt(i32 %28)
store double %29, double* %5
%30 = load double, double* %2
%31 = load double, double* %5
%32 = fsub double %30, %31
store double %32, double* %6
%33 = load double, double* %2
%34 = load double, double* %2
%35 = fmul double %33, %34
%36 = load double, double* %2
%37 = load double, double* %6
%38 = fsub double %36, %37
%39 = load double, double* %2
%40 = fdiv double %38, %39
%41 = call double @acos(double %40)
%42 = load double, double* %2
%43 = load double, double* %6
%44 = fsub double %42, %43
%45 = load double, double* %2
%46 = fmul double 2.000000e+00, %45
%47 = load double, double* %6
%48 = load double, double* %6
%49 = load double, double* %6
%50 = fmul double %48, %49
%51 = fneg double %50
%52 = call double @llvm.fmuladd.f64(double %46, double %47, double %51)
%53 = fptosi double %52 to i32
%54 = call double @sqrt(i32 %53)
%55 = fmul double %44, %54
%56 = fneg double %55
%57 = call double @llvm.fmuladd.f64(double %35, double %41, double %56)
store double %57, double* %7
%58 = load double, double* %2
%59 = fmul double 0x400921FB54442D18, %58
%60 = load double, double* %2
%61 = fmul double %59, %60
store double %61, double* %8
%62 = load double, double* %8
%63 = load double, double* %7
%64 = fsub double %62, %63
store double %64, double* %9
%65 = load double, double* %9
%66 = load double, double* %7
%67 = fcmp olt double %65, %66
br i1 %67, label %68, label %72
68: ; preds = %26
%69 = load double, double* %7
%70 = load double, double* %9
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %69, double %70)
br label %76
72: ; preds = %26
%73 = load double, double* %9
%74 = load double, double* %7
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %73, double %74)
br label %76
76: ; preds = %72, %68
br label %77
77: ; preds = %76, %24
br label %10
78: ; preds = %10
ret i32 0
}

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