#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 jcan, count, subcount;
  float mv_x, mv_y, mass, sl_x, sl_y, x, y;
  float jcan_cord[999][999];
  scanf("%d", &jcan);
  scanf("%f %f", &x, &y);
  mass = 1.0;
  for (count = 0; count < jcan; count++) {
    scanf("%f %f", &jcan_cord[count][0], &jcan_cord[count][1]);
  }
  for (subcount = 0; subcount < jcan; subcount++) {
    mv_x = jcan_cord[subcount][0] - x;
    mv_y = jcan_cord[subcount][1] - y;
    sl_x = mv_x / mass;
    sl_y = mv_y / mass;
    mass = mass * 2;
    mv_x = mv_x + sl_x;
    mv_y = mv_y + sl_y;
    printf("%0.2f %0.2f \n", mv_x, mv_y);
    x = x + mv_x;
    y = y + mv_y;
  }
  printf("%0.2f %0.2f \n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3ce9f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecf(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe9e(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11c4 <main+0xa4>
movslq -0xc(%rbp),%rax
lea    -0x3ce9f0(%rbp),%rsi
imul   $0xf9c,%rax,%rax
add    %rax,%rsi
movslq -0xc(%rbp),%rax
lea    -0x3ce9f0(%rbp),%rdx
imul   $0xf9c,%rax,%rax
add    %rax,%rdx
add    $0x4,%rdx
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116e <main+0x4e>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12ae <main+0x18e>
movslq -0x10(%rbp),%rcx
lea    -0x3ce9f0(%rbp),%rax
imul   $0xf9c,%rcx,%rcx
add    %rcx,%rax
movss  (%rax),%xmm0
subss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movslq -0x10(%rbp),%rcx
lea    -0x3ce9f0(%rbp),%rax
imul   $0xf9c,%rcx,%rcx
add    %rcx,%rax
movss  0x4(%rax),%xmm0
subss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
divss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xdc0(%rip),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x18(%rbp),%xmm0
addss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xd94(%rip),%rdi
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x2c(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11cb <main+0xab>
movss  -0x28(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm1
lea    0xd52(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3ce9f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x3cea00,%rsp
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    1258 <main+0x138>
lea    0x30(%rsp),%rbx
lea    0xe99(%rip),%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    0x4(%rbx),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
add    $0x1,%r15
movslq 0xc(%rsp),%rax
add    $0xf9c,%rbx
cmp    %rax,%r15
jl     1180 <main+0x60>
test   %eax,%eax
jle    1258 <main+0x138>
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
unpcklps %xmm1,%xmm0
movss  0xe3b(%rip),%xmm2
lea    0x30(%rsp),%r15
xor    %ebx,%ebx
lea    0xe3a(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r15),%xmm1
subps  %xmm0,%xmm1
movaps %xmm2,%xmm3
shufps $0x0,%xmm2,%xmm3
movaps %xmm1,%xmm0
divps  %xmm3,%xmm0
addss  %xmm2,%xmm2
movaps %xmm2,0x20(%rsp)
addps  %xmm1,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
mov    %r14,%rdi
call   1030 <printf@plt>
movaps 0x20(%rsp),%xmm2
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
unpcklps %xmm1,%xmm0
addps  0x10(%rsp),%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
movss  %xmm0,0x8(%rsp)
movss  %xmm1,0x4(%rsp)
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0xf9c,%r15
cmp    %rax,%rbx
jl     11e0 <main+0xc0>
jmp    1267 <main+0x147>
movss  0x4(%rsp),%xmm1
movss  0x8(%rsp),%xmm0
unpcklps %xmm1,%xmm0
movaps %xmm0,%xmm1
shufps $0x55,%xmm0,%xmm1
lea    0xd98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x3cea00,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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