#!/usr/bin/ruby
# 距離の平滑化
# Satofumi KAMIMURA
#

pre2_x = 0
pre2_y = 0
pre_x = 0
pre_y = 0

points = []
while line = gets
  x, y = line.split
  x = x.to_i
  y = y.to_i

  average_x = ((((pre2_x + x) / 2) * 2) + (pre_x * 1)) / 3
  average_y = ((((pre2_y + y) / 2) * 2) + (pre_y * 1)) / 3

  points << [average_x, average_y]

  pre2_x = pre_x
  pre2_y = pre_y
  pre_x = x
  pre_y = y
end

points.each do |point|
  print point[0], "\t", point[1], "\n"
end
