gets
ARGF.each_line do |line|
  x1, y1, x2, y2, x3, y3 = line.split.map(&:to_f)
  
  px = -((y2 - y1) * y3**2 + (-y2**2 + y1**2 - x2**2 + x1**2) * y3 + y1 * y2**2 + (-y1**2 + x3**2 - x1**2) * y2 + (x2**2 - x3**2) * y1) /
        ((2 * x2 - 2 * x1) * y3 + (2 * x1 - 2 * x3) * y2 + (2 * x3 - 2 * x2) * y1)
  py = ((x2 - x1) * y3**2 + (x1 - x3) * y2**2 + (x3 - x2) * y1**2 + (x2 - x1) * x3**2 + (x1**2 - x2**2) * x3 + x1 * x2**2 - x1**2 * x2) /
       ((2 * x2 - 2 * x1) * y3 + (2 * x1 - 2 * x3) * y2 + (2 * x3 - 2 * x2) * y1)
  r = Math.sqrt((px - x1)**2 + (py - y1)**2)

  px = sprintf("%.3f", (px * 1000).round / 1000.0)
  py = sprintf("%.3f", (py * 1000).round / 1000.0)
  r  = sprintf("%.3f", (r  * 1000).round / 1000.0)
  puts [px, py, r].join("\s")
end