#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(int);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int i, n;
  double w, h, r, a, area;
  scanf("%d", &n);
  {
    for (i = 1; i <= n; i++) {
      scanf("%lf", &w);
      h = (3 * w) / 5;
      r = w / 5;
      area = acos(-1) * r * r;
      a = h * w - area;
      printf("%.2lf %.2lf\n", area, a);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     121a <main+0xea>
lea    0xea8(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsd  0xe8a(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe75(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe5f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xecf(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11e4 <main+0xb4>
lea    0xeb4(%rip),%r14
lea    0x10(%rsp),%r15
lea    0xeac(%rip),%rbx
xor    %ebp,%ebp
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm2
movapd %xmm2,%xmm1
mulsd  0xe71(%rip),%xmm1
movsd  0xe71(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
divsd  %xmm0,%xmm2
movsd  %xmm2,0x18(%rsp)
mov    $0xffffffff,%edi
call   1040 <acos@plt>
movsd  0x18(%rsp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     1170 <main+0x40>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [13 x i8] c"%.2lf %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 1, i32* %2
br label %10
10: ; preds = %34, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp sle i32 %11, %12
br i1 %13, label %14, label %37
14: ; preds = %10
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%16 = load double, double* %4
%17 = fmul double 3.000000e+00, %16
%18 = fdiv double %17, 5.000000e+00
store double %18, double* %5
%19 = load double, double* %4
%20 = fdiv double %19, 5.000000e+00
store double %20, double* %6
%21 = call double @acos(i32 -1)
%22 = load double, double* %6
%23 = fmul double %21, %22
%24 = load double, double* %6
%25 = fmul double %23, %24
store double %25, double* %8
%26 = load double, double* %5
%27 = load double, double* %4
%28 = load double, double* %8
%29 = fneg double %28
%30 = call double @llvm.fmuladd.f64(double %26, double %27, double %29)
store double %30, double* %7
%31 = load double, double* %8
%32 = load double, double* %7
%33 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %31, double %32)
br label %34
34: ; preds = %14
%35 = load i32, i32* %2
%36 = add nsw i32 %35, 1
store i32 %36, i32* %2
br label %10
37: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [13 x i8] c"%.2lf %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 1
br i1 %7, label %25, label %8
8: ; preds = %0, %8
%9 = phi i32 [ %22, %8 ], [ 1, %0 ]
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%11 = load double, double* %2
%12 = fmul double %11, 3.000000e+00
%13 = fdiv double %12, 5.000000e+00
%14 = fdiv double %11, 5.000000e+00
%15 = call double @acos(i32 -1)
%16 = fmul double %15, %14
%17 = fmul double %14, %16
%18 = load double, double* %2
%19 = fneg double %17
%20 = call double @llvm.fmuladd.f64(double %13, double %18, double %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), double %17, double %20)
%22 = add nuw nsw i32 %9, 1
%23 = load i32, i32* %1
%24 = icmp slt i32 %9, %23
br i1 %24, label %8, label %25
25: ; preds = %8, %0
ret i32 0
}