#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 = 0, weight = 1;
  float x, y, bidoni_kords_x[999], bidoni_kords_y[999];
  scanf("%d", &n);
  scanf("%f %f", &x, &y);
  for (i = 0; i < n; i++) {
    scanf("%f %f", &bidoni_kords_x[i], &bidoni_kords_y[i]);
  }
  for (i = 0; i < n; i++) {
    float f_vector = bidoni_kords_x[i] - x;
    float s_vector = bidoni_kords_y[i] - y;
    f_vector = f_vector + (f_vector / weight);
    s_vector = s_vector + (s_vector / weight);
    printf("%.2f %.2f\n", f_vector, s_vector);
    x = x + f_vector;
    y = y + s_vector;
    weight = weight * 2;
  }
  printf("%.2f %.2f\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11bb <main+0x9b>
movslq -0xc(%rbp),%rax
lea    -0xfc0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
lea    -0x1f60(%rbp),%rdx
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116f <main+0x4f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12a3 <main+0x183>
movslq -0xc(%rbp),%rax
movss  -0xfc0(%rbp,%rax,4),%xmm0
ff ff
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x1f64(%rbp)
ff
movslq -0xc(%rbp),%rax
movss  -0x1f60(%rbp,%rax,4),%xmm0
ff ff
subss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1f68(%rbp)
ff
movss  -0x1f64(%rbp),%xmm0
ff
movss  -0x1f64(%rbp),%xmm1
ff
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1f64(%rbp)
ff
movss  -0x1f68(%rbp),%xmm0
ff
movss  -0x1f68(%rbp),%xmm1
ff
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x1f68(%rbp)
ff
movss  -0x1f64(%rbp),%xmm0
ff
movss  -0x1f68(%rbp),%xmm1
ff
lea    0xda6(%rip),%rdi
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
addss  -0x1f64(%rbp),%xmm0
ff
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x1f68(%rbp),%xmm0
ff
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11c2 <main+0xa2>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xd55(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1f70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x1f68,%rsp
lea    0xecc(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xebc(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1246 <main+0x126>
lea    0x20(%rsp),%r14
lea    0xfc0(%rsp),%rbx
lea    0xe8c(%rip),%r15
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
add    $0x4,%r14
add    $0x4,%rbx
cmp    %rax,%rbp
jl     1180 <main+0x60>
test   %eax,%eax
jle    1246 <main+0x126>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
unpcklps %xmm0,%xmm1
mov    $0x1,%ebp
xor    %ebx,%ebx
lea    0xe3e(%rip),%r14
nopl   0x0(%rax,%rax,1)
movss  0xfc0(%rsp,%rbx,4),%xmm0
movss  0x20(%rsp,%rbx,4),%xmm2
unpcklps %xmm0,%xmm2
subps  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
shufps $0x0,%xmm0,%xmm0
movaps %xmm2,%xmm1
divps  %xmm0,%xmm1
addps  %xmm2,%xmm1
movaps %xmm1,0x10(%rsp)
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
unpcklps %xmm0,%xmm1
addps  0x10(%rsp),%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
movss  %xmm0,0x8(%rsp)
movss  %xmm1,0x4(%rsp)
add    %ebp,%ebp
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     11d0 <main+0xb0>
jmp    1255 <main+0x135>
movss  0x8(%rsp),%xmm0
movss  0x4(%rsp),%xmm1
unpcklps %xmm0,%xmm1
movaps %xmm1,%xmm0
shufps $0x55,%xmm1,%xmm0
lea    0xda6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1f68,%rsp
pop    %rbx
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"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
%7 = alloca [999 x float]
%8 = alloca [999 x float]
%9 = alloca float
%10 = alloca float
store i32 0, i32* %1
store i32 0, i32* %3
store i32 1, i32* %4
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %5, float* %6)
store i32 0, i32* %3
br label %13
13: ; preds = %25, %0
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %28
17: ; preds = %13
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [999 x float], [999 x float]* %7, i64 0, i64 %19
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [999 x float], [999 x float]* %8, i64 0, i64 %22
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %20, float* %23)
br label %25
25: ; preds = %17
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %13
28: ; preds = %13
store i32 0, i32* %3
br label %29
29: ; preds = %69, %28
%30 = load i32, i32* %3
%31 = load i32, i32* %2
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %72
33: ; preds = %29
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [999 x float], [999 x float]* %7, i64 0, i64 %35
%37 = load float, float* %36
%38 = load float, float* %5
%39 = fsub float %37, %38
store float %39, float* %9
%40 = load i32, i32* %3
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [999 x float], [999 x float]* %8, i64 0, i64 %41
%43 = load float, float* %42
%44 = load float, float* %6
%45 = fsub float %43, %44
store float %45, float* %10
%46 = load float, float* %9
%47 = load float, float* %9
%48 = load i32, i32* %4
%49 = sitofp i32 %48 to float
%50 = fdiv float %47, %49
%51 = fadd float %46, %50
store float %51, float* %9
%52 = load float, float* %10
%53 = load float, float* %10
%54 = load i32, i32* %4
%55 = sitofp i32 %54 to float
%56 = fdiv float %53, %55
%57 = fadd float %52, %56
store float %57, float* %10
%58 = load float, float* %9
%59 = load float, float* %10
%60 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %58, float %59)
%61 = load float, float* %5
%62 = load float, float* %9
%63 = fadd float %61, %62
store float %63, float* %5
%64 = load float, float* %6
%65 = load float, float* %10
%66 = fadd float %64, %65
store float %66, float* %6
%67 = load i32, i32* %4
%68 = mul nsw i32 %67, 2
store i32 %68, i32* %4
br label %69
69: ; preds = %33
%70 = load i32, i32* %3
%71 = add nsw i32 %70, 1
store i32 %71, i32* %3
br label %29
72: ; preds = %29
%73 = load float, float* %5
%74 = load float, float* %6
%75 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), float %73, float %74)
ret i32 0
}

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