require 'matrix'

c1x, c1y, r1 = gets.split.map &:to_i
c2x, c2y, r2 = gets.split.map &:to_i

c1 = Vector[c1x, c1y]
c2 = Vector[c2x, c2y]

cos_t = (r1**2 + (c2-c1).norm**2 - r2**2) / (2 * r1 * (c2-c1).norm)
sin_t = (1 - cos_t**2) ** (1/2.0)
p0 = c1 + ((c2-c1)/(c2-c1).norm) * r1
p = []
p[0] = [p0[0]*cos_t-p0[1]*sin_t, p0[0]*sin_t+p0[1]*cos_t]
p[1] = [p0[0]*cos_t+p0[1]*sin_t, p0[1]*cos_t-p0[0]*sin_t]

if p[0][0] != p[1][0]
  p.sort! { |a, b| a[0] <=> b[0] }
else
  p.sort! { |a, b| a[1] <=> b[1] }
end

puts "%.7f %.7f %.7f %.7f" % [p[0][0], p[0][1], p[1][0], p[1][1]]