$<.each_line do |l|
  x1, y1, x2, y2, xq, yq = l.split(?,).map(&:to_f)
  u = (x2 - x1) + (y2 - y1) * 1i
  v = (xq - x1) + (yq - y1) * 1i
  r = xq + yq * 1i - 2 * (v - (v.real * u.real + v.imag * u.imag) / (u.abs**2) * u)
  puts '%.4f %.4f' % [r.real, r.imag]
end