x1, y1, r1 = gets.split.map(&:to_i)
x2, y2, r2 = gets.split.map(&:to_i)

dist_o1_to_o2 = Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2)

dist_o1_to_cross =
  (r1 ** 2 - r2 ** 2 + dist_o1_to_o2 ** 2) / (2 * dist_o1_to_o2)

dist_cross_half = Math.sqrt(r1 ** 2 - dist_o1_to_cross ** 2)

r = dist_o1_to_cross / dist_o1_to_o2
cx = x1 + r * (x2 - x1)
cy = y1 + r * (y2 - y1)

sin = (y2 - y1) / dist_o1_to_o2
cos = (x2 - x1) / dist_o1_to_o2
puts [[cx + dist_cross_half * sin, cy + dist_cross_half * cos],
 [cx - dist_cross_half * sin, cy - dist_cross_half * cos]]
 .sort.join(' ')