#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 */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n, i;
  int pac_mass = 1;
  scanf("%d", &n);
  float x_man, y_man, vector_x = 0.0, vector_y = 0.0;
  scanf("%f %f", &x_man, &y_man);
  float x[n];
  float y[n];
  for (i = 0; i < n; i++) {
    scanf("%f %f", &x[i], &y[i]);
  }
  for (i = 0; i < n; i++) {
    vector_x = (x[i] - x_man) + (x[i] - x_man) / pac_mass;
    vector_y = (y[i] - y_man) + (y[i] - y_man) / pac_mass;
    printf("%.2f %.2f\n", vector_x, vector_y);
    pac_mass = pac_mass * 2;
    x_man = x_man + vector_x;
    y_man = y_man + vector_y;
  }
  printf("%.2f %.2f", x_man, y_man);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xec3(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x49(%rbp)
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x49(%rbp),%al
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
lea    0xea0(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x38(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1204 <main+0xe4>
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11be <main+0x9e>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12c6 <main+0x1a6>
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
subss  -0x14(%rbp),%xmm0
movslq -0xc(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm1
subss  -0x14(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x18(%rbp),%xmm0
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
subss  -0x18(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
lea    0xd7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    120b <main+0xeb>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xd3d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xec8(%rip),%rdi
lea    -0x34(%rbp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeb9(%rip),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rsp,%r13
mov    -0x34(%rbp),%eax
mov    %rsp,%r15
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x34(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r12
mov    %r12,%rsp
test   %eax,%eax
jle    1281 <main+0x161>
mov    %r13,-0x48(%rbp)
lea    0xe64(%rip),%r14
mov    %r15,-0x40(%rbp)
mov    %r12,%rbx
xor    %r13d,%r13d
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r13
movslq -0x34(%rbp),%rax
add    $0x4,%rbx
add    $0x4,%r15
cmp    %rax,%r13
jl     11b0 <main+0x90>
test   %eax,%eax
mov    -0x48(%rbp),%r13
mov    -0x40(%rbp),%rcx
jle    1281 <main+0x161>
movss  -0x30(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
unpcklps %xmm0,%xmm1
mov    $0x1,%r15d
xor    %ebx,%ebx
lea    0xe08(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2ss %r15d,%xmm0
movss  (%rcx,%rbx,4),%xmm2
movss  (%r12,%rbx,4),%xmm3
unpcklps %xmm2,%xmm3
subps  %xmm1,%xmm3
shufps $0x0,%xmm0,%xmm0
movaps %xmm3,%xmm1
divps  %xmm0,%xmm1
addps  %xmm3,%xmm1
movaps %xmm1,-0x60(%rbp)
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
mov    -0x40(%rbp),%rcx
add    %r15d,%r15d
movss  -0x30(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
unpcklps %xmm0,%xmm1
addps  -0x60(%rbp),%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
movss  %xmm0,-0x30(%rbp)
movss  %xmm1,-0x2c(%rbp)
add    $0x1,%rbx
movslq -0x34(%rbp),%rax
cmp    %rax,%rbx
jl     1210 <main+0xf0>
jmp    128e <main+0x16e>
movss  -0x30(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
lea    0xd78(%rip),%rdi
call   1030 <printf@plt>
mov    %r13,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [11 x i8] c"%.2f %.2f\0A\00"
@.str.3 = [10 x i8] c"%.2f %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
store i32 0, i32* %1
store i32 1, i32* %4
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
store float 0.000000e+00, float* %7
store float 0.000000e+00, float* %8
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %5, float* %6)
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %9
%17 = alloca float, i64 %15
store i64 %15, i64* %10
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
%20 = alloca float, i64 %19
store i64 %19, i64* %11
store i32 0, i32* %3
br label %21
21: ; preds = %33, %0
%22 = load i32, i32* %3
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %36
25: ; preds = %21
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds float, float* %17, i64 %27
%29 = load i32, i32* %3
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds float, float* %20, i64 %30
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %28, float* %31)
br label %33
33: ; preds = %25
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %21
36: ; preds = %21
store i32 0, i32* %3
br label %37
37: ; preds = %85, %36
%38 = load i32, i32* %3
%39 = load i32, i32* %2
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %88
41: ; preds = %37
%42 = load i32, i32* %3
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds float, float* %17, i64 %43
%45 = load float, float* %44
%46 = load float, float* %5
%47 = fsub float %45, %46
%48 = load i32, i32* %3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds float, float* %17, i64 %49
%51 = load float, float* %50
%52 = load float, float* %5
%53 = fsub float %51, %52
%54 = load i32, i32* %4
%55 = sitofp i32 %54 to float
%56 = fdiv float %53, %55
%57 = fadd float %47, %56
store float %57, float* %7
%58 = load i32, i32* %3
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds float, float* %20, i64 %59
%61 = load float, float* %60
%62 = load float, float* %6
%63 = fsub float %61, %62
%64 = load i32, i32* %3
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds float, float* %20, i64 %65
%67 = load float, float* %66
%68 = load float, float* %6
%69 = fsub float %67, %68
%70 = load i32, i32* %4
%71 = sitofp i32 %70 to float
%72 = fdiv float %69, %71
%73 = fadd float %63, %72
store float %73, float* %8
%74 = load float, float* %7
%75 = load float, float* %8
%76 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %74, float %75)
%77 = load i32, i32* %4
%78 = mul nsw i32 %77, 2
store i32 %78, i32* %4
%79 = load float, float* %5
%80 = load float, float* %7
%81 = fadd float %79, %80
store float %81, float* %5
%82 = load float, float* %6
%83 = load float, float* %8
%84 = fadd float %82, %83
store float %84, float* %6
br label %85
85: ; preds = %41
%86 = load i32, i32* %3
%87 = add nsw i32 %86, 1
store i32 %87, i32* %3
br label %37
88: ; preds = %37
%89 = load float, float* %5
%90 = load float, float* %6
%91 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), float %89, float %90)
store i32 0, i32* %1
%92 = load i8*, i8** %9
%93 = load i32, i32* %1
ret i32 %93
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@.str.2 = [11 x i8] c"%.2f %.2f\0A\00"
@.str.3 = [10 x i8] c"%.2f %.2f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = bitcast float* %2 to i8*
%7 = bitcast float* %3 to i8*
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %2, float* %3)
%9 = load i32, i32* %1
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
%12 = alloca float, i64 %10
%13 = load i32, i32* %1
%14 = zext i32 %13 to i64
%15 = alloca float, i64 %14
%16 = icmp sgt i32 %13, 0
br i1 %16, label %29, label %19
17: ; preds = %29
%18 = icmp sgt i32 %35, 0
br i1 %18, label %24, label %19
19: ; preds = %0, %17
%20 = load float, float* %2
%21 = load float, float* %3
%22 = insertelement <2 x float> poison, float %21, i64 0
%23 = insertelement <2 x float> %22, float %20, i64 1
br label %69
24: ; preds = %17
%25 = load float, float* %2
%26 = load float, float* %3
%27 = insertelement <2 x float> poison, float %26, i64 0
%28 = insertelement <2 x float> %27, float %25, i64 1
br label %38
29: ; preds = %0, %29
%30 = phi i64 [ %34, %29 ], [ 0, %0 ]
%31 = getelementptr inbounds float, float* %12, i64 %30
%32 = getelementptr inbounds float, float* %15, i64 %30
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %31, float* %32)
%34 = add nuw nsw i64 %30, 1
%35 = load i32, i32* %1
%36 = sext i32 %35 to i64
%37 = icmp slt i64 %34, %36
br i1 %37, label %29, label %17
38: ; preds = %24, %38
%39 = phi i64 [ 0, %24 ], [ %65, %38 ]
%40 = phi i32 [ 1, %24 ], [ %57, %38 ]
%41 = phi <2 x float> [ %28, %24 ], [ %62, %38 ]
%42 = getelementptr inbounds float, float* %12, i64 %39
%43 = load float, float* %42
%44 = sitofp i32 %40 to float
%45 = getelementptr inbounds float, float* %15, i64 %39
%46 = load float, float* %45
%47 = insertelement <2 x float> poison, float %46, i64 0
%48 = insertelement <2 x float> %47, float %43, i64 1
%49 = fsub <2 x float> %48, %41
%50 = insertelement <2 x float> poison, float %44, i64 0
%51 = shufflevector <2 x float> %50, <2 x float> poison, <2 x i32> zeroinitializer
%52 = fdiv <2 x float> %49, %51
%53 = fadd <2 x float> %49, %52
%54 = extractelement <2 x float> %53, i64 0
%55 = extractelement <2 x float> %53, i64 1
%56 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %55, float %54)
%57 = shl nsw i32 %40, 1
%58 = load float, float* %2
%59 = load float, float* %3
%60 = insertelement <2 x float> poison, float %59, i64 0
%61 = insertelement <2 x float> %60, float %58, i64 1
%62 = fadd <2 x float> %53, %61
%63 = extractelement <2 x float> %62, i64 1
store float %63, float* %2
%64 = extractelement <2 x float> %62, i64 0
store float %64, float* %3
%65 = add nuw nsw i64 %39, 1
%66 = load i32, i32* %1
%67 = sext i32 %66 to i64
%68 = icmp slt i64 %65, %67
br i1 %68, label %38, label %69
69: ; preds = %38, %19
%70 = phi <2 x float> [ %23, %19 ], [ %62, %38 ]
%71 = extractelement <2 x float> %70, i64 0
%72 = extractelement <2 x float> %70, i64 1
%73 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), float %72, float %71)
ret i32 0
}