readlines.each do |l|
  x1,y1,x2,y2,xq,yq = l.split(",").map(&:to_f)
  if y1==y2
    xr = xq
    yr = yq + (y1-yq)*2
  elsif x1==x2
    xr = xq + (x1-xq)*2
    yr = yq
  else
    a = -(x2-x1)/(y2-y1)
    b = -xq*a + yq
    c = (y2-y1)/(x2-x1)
    d = -x1*c + y1
    x = (d-b)/(a-c)
    xr = xq + (x-xq)*2
    yr = a*xr + b
  end
  puts "#{xr} #{yr}"
end