For given two circles $c1$ and $c2$, print the coordinates of the cross points of them.

Constraints

* The given circle have at least one cross point and have different center coordinates.
* $-10,000 \leq c1x, c1y, c2x, c2y \leq 10,000$
* $1 \leq c1r, c2r \leq 10,000$

Input

The input is given in the following format.

$c1x\; c1y\; c1r$
$c2x\; c2y\; c2r$


$c1x$, $c1y$ and $c1r$ represent the coordinate and radius of the first circle. $c2x$, $c2y$ and $c2r$ represent the coordinate and radius of the second circle. All input values are given in integers.

Output

Print the coordinates ($x1$, $y1$) and ($x2$, $y2$) of the cross points $p1$ and $p2$ respectively in the following rules.

* If there is one cross point, print two coordinates with the same values.
* Print the coordinate with smaller $x$ first. In case of a tie, print the coordinate with smaller $y$ first.



The output values should be in a decimal fraction with an error less than 0.000001.

Examples

Input

0 0 2
2 0 2


Output

1.00000000 -1.73205080 1.00000000 1.73205080


Input

0 0 2
0 3 1


Output

0.00000000 2.00000000 0.00000000 2.00000000

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
import math
EPS = 1e-10
COUNTER_CLOCKWISE = 1
CLOCKWISE = -1
ONLINE_BACK = 2
ONLINE_FRONT = -2
ON_SEGMENT = 0

class Point:
	global EPS

	def __init__(self, x=0, y=0):
		self.x = x
		self.y = y

	def __add__(a, b):
		s = a.x + b.x
		t = a.y + b.y
		return Point(s, t)

	def __sub__(a, b):
		s = a.x - b.x
		t = a.y - b.y
		return Point(s, t)

	def __mul__(self, a):
		s = a * self.x
		t = a * self.y
		return Point(s, t)

	def __truediv__(self, a):
		s = self.x / a
		t = self.y / a
		return Point(s, t)

	def norm(self):
		return self.x * self.x + self.y * self.y

	def abs(self):
		return self.norm() ** 0.5

	def __eq__(self, other):
		return abs(self.x - other.y) < self.EPS and abs(self.y - other.y) < self.EPS

	def dot(self, b):
		return self.x * b.x + self.y * b.y

	def cross(self, b):
		return self.x * b.y - self.y * b.x

class Segment:

	def __init__(self, p1, p2):
		self.p1 = p1
		self.p2 = p2

class Circle:

	def __init__(self, c, r):
		self.c = c
		self.r = r

def project(s, p):
	base = s.p2 - s.p1
	hypo = p - s.p1
	r = hypo.dot(base) / base.norm()
	return s.p1 + base * r

def reflecton(s, p):
	return p + (project(s, p) - p) * 2

def getDistance(a, b):
	return (a - b).abs()

def getDistanceLP(l, p):
	return abs((l.p2 - l.p1).cross(p - l.p1)) / (l.p2 - l.p1).abs()

def getDistanceSP(s, p):
	if (s.p2 - s.p1).dot(p - s.p1) < 0:
		return (p - s.p1).abs()
	elif (s.p1 - s.p2).dot(p - s.p2) < 0:
		return (p - s.p2).abs()
	return getDistanceLP(s, p)

def getDistanceSS(s1, s2):
	if intersectS(s1, s2):
		return 0
	return min(getDistanceSP(s1, s2.p1), getDistanceSP(s1, s2.p2), getDistanceSP(s2, s1.p1), getDistanceSP(s2, s1.p2))

def ccw(p0, p1, p2):
	a = p1 - p0
	b = p2 - p0
	if a.cross(b) > 0:
		return COUNTER_CLOCKWISE
	elif a.cross(b) < 0:
		return CLOCKWISE
	elif a.dot(b) < 0:
		return ONLINE_BACK
	elif a.abs() < b.abs():
		return ONLINE_FRONT
	else:
		return ON_SEGMENT

def intersect(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

def intersectS(s1, s2):
	return intersect(s1.p1, s1.p2, s2.p1, s2.p2)

def getCrossPoint(s1, s2):
	base = s2.p2 - s2.p1
	a = s1.p1 - s2.p1
	b = s1.p2 - s2.p1
	d1 = abs(a.cross(base))
	d2 = abs(b.cross(base))
	t = d1 / (d1 + d2)
	return s1.p1 + (s1.p2 - s1.p1) * t

def getCrossPointC(c, l):
	pr = project(l, c.c)
	e = (l.p2 - l.p1) / (l.p2 - l.p1).abs()
	base = (c.r * c.r - (pr - c.c).norm()) ** 0.5
	return (pr - e * base, pr + e * base)

def printPoint(p1, p2):
	print(round(p1.x, 8), round(p1.y, 8), round(p2.x, 8), round(p2.y, 8))

def arg(p):
	return math.atan2(p.y, p.x)

def polar(a, r):
	return Point(a * math.cos(r), a * math.sin(r))

def getCrossPointCC(c1, c2):
	d = (c2.c - c1.c).abs()
	a = math.acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d))
	b = arg(c2.c - c1.c)
	return (c1.c + polar(c1.r, b + a), c1.c + polar(c1.r, b - a))
nums = list(map(int, input().split()))
c1 = Circle(Point(nums[0], nums[1]), nums[2])
nums = list(map(int, input().split()))
c2 = Circle(Point(nums[0], nums[1]), nums[2])
(p1, p2) = getCrossPointCC(c1, c2)
if p1.x < p2.x:
	printPoint(p1, p2)
elif p1.x > p2.x:
	printPoint(p2, p1)
elif p1.y < p2.y:
	printPoint(p1, p2)
else:
	printPoint(p2, p1)


import math, cmath

def print_cross_points(c1, r1, c2, r2):
	c1c2 = c2 - c1
	d = abs(c1c2)
	a = math.acos((r1 ** 2 + d ** 2 - r2 ** 2) / (2 * r1 * d))
	t = cmath.phase(c1c2)
	cp1 = c1 + cmath.rect(r1, t + a)
	cp2 = c1 + cmath.rect(r1, t - a)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
(c1x, c1y, c1r) = map(int, input().split())
(c2x, c2y, c2r) = map(int, input().split())
if c1y < c2y:
	print_cross_points(c1x + c1y * 1j, c1r, c2x + c2y * 1j, c2r)
elif c1y > c2y or c1x < c2x:
	print_cross_points(c2x + c2y * 1j, c2r, c1x + c1y * 1j, c1r)
else:
	print_cross_points(c1x + c1y * 1j, c1r, c2x + c2y * 1j, c2r)


import math
from typing import Union

class Point(object):
	__slots__ = ['x', 'y']

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __add__(self, other):
		return Point(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Point(self.x - other.x, self.y - other.y)

	def __mul__(self, other: Union[int, float]):
		return Point(self.x * other, self.y * other)

	def norm(self):
		return pow(self.x, 2) + pow(self.y, 2)

	def abs(self):
		return math.sqrt(self.norm())

	def __repr__(self):
		return f'({self.x},{self.y})'

class Vector(Point):
	__slots__ = ['x', 'y', 'pt1', 'pt2']

	def __init__(self, pt1: Point, pt2: Point):
		super().__init__(pt2.x - pt1.x, pt2.y - pt1.y)
		self.pt1 = pt1
		self.pt2 = pt2

	def dot(self, other):
		return self.x * other.x + self.y * other.y

	def cross(self, other):
		return self.x * other.y - self.y * other.x

	def __repr__(self):
		return f'{self.pt1},{self.pt2}'

class Segment(Vector):
	__slots__ = ['x', 'y', 'pt1', 'pt2']

	def __init__(self, pt1: Point, pt2: Point):
		super().__init__(pt1, pt2)

	def projection(self, pt: Point) -> Point:
		t = self.dot(Vector(self.pt1, pt)) / self.norm()
		return self.pt1 + self * t

	def reflection(self, pt: Point) -> Point:
		return self.projection(pt) * 2 - pt

	def is_intersected_with(self, other) -> bool:
		if self.point_geometry(other.pt1) * self.point_geometry(other.pt2) <= 0 and other.point_geometry(self.pt1) * other.point_geometry(self.pt2) <= 0:
			return True
		else:
			return False

	def point_geometry(self, pt: Point) -> int:
		vec_pt1_to_pt = Vector(self.pt1, pt)
		cross = self.cross(vec_pt1_to_pt)
		if cross > 0:
			return -1
		elif cross < 0:
			return 1
		else:
			dot = self.dot(vec_pt1_to_pt)
			if dot < 0:
				return -2
			elif self.abs() < vec_pt1_to_pt.abs():
				return 2
			else:
				return 0

	def cross_point(self, other) -> Point:
		d1 = abs(self.cross(Vector(self.pt1, other.pt1)))
		d2 = abs(self.cross(Vector(self.pt1, other.pt2)))
		t = d1 / (d1 + d2)
		return other.pt1 + other * t

	def distance_to_point(self, pt: Point) -> Union[int, float]:
		vec_pt1_to_pt = Vector(self.pt1, pt)
		if self.dot(vec_pt1_to_pt) <= 0:
			return vec_pt1_to_pt.abs()
		vec_pt2_to_pt = Vector(self.pt2, pt)
		if Vector.dot(self * -1, vec_pt2_to_pt) <= 0:
			return vec_pt2_to_pt.abs()
		return (self.projection(pt) - pt).abs()

	def distance_to_segment(self, other) -> Union[int, float]:
		if self.is_intersected_with(other):
			return 0.0
		else:
			return min(self.distance_to_point(other.pt1), self.distance_to_point(other.pt2), other.distance_to_point(self.pt1), other.distance_to_point(self.pt2))

	def __repr__(self):
		return f'{self.pt1},{self.pt2}'

class Circle(Point):
	__slots__ = ['x', 'y', 'r']

	def __init__(self, x, y, r):
		super().__init__(x, y)
		self.r = r

	def cross_point_with_circle(self, other):
		vec_self_to_other = Vector(self, other)
		vec_abs = vec_self_to_other.abs()
		t = ((pow(self.r, 2) - pow(other.r, 2)) / pow(vec_abs, 2) + 1) / 2
		pt = (other - self) * t
		abs_from_pt = math.sqrt(pow(self.r, 2) - pt.norm())
		inv = Point(vec_self_to_other.y / vec_abs, -vec_self_to_other.x / vec_abs) * abs_from_pt
		pt_ = self + pt
		return (pt_ + inv, pt_ - inv)

	def __repr__(self):
		return f'({self.x},{self.y}), {self.r}'

def main():
	(c1x, c1y, c1r) = map(int, input().split())
	(c2x, c2y, c2r) = map(int, input().split())
	(pt1, pt2) = Circle(c1x, c1y, c1r).cross_point_with_circle(Circle(c2x, c2y, c2r))
	if pt1.x > pt2.x or (pt1.x == pt2.x and pt1.y > pt2.y):
		tmp = pt1
		pt1 = pt2
		pt2 = tmp
	print(' '.join(map('{:.10f}'.format, [pt1.x, pt1.y, pt2.x, pt2.y])))
	return
main()


def unit(a):
	return a / abs(a)
(c1x, c1y, c1r) = map(int, input().split())
(c2x, c2y, c2r) = map(int, input().split())
a = complex(c1x, c1y)
b = complex(c2x, c2y)
ab = abs(b - a)
ac = (c1r ** 2 + ab ** 2 - c2r ** 2) / (2 * ab)
c = a + (b - a) * (ac / ab)
pc = (c1r ** 2 - ac ** 2) ** 0.5
p = c + pc * unit(b - a) * 1j
q = c + pc * unit(b - a) * -1j
if p.real > q.real:
	(p, q) = (q, p)
if abs(p.real - q.real) < 1e-06 and p.imag > q.imag:
	(p, q) = (q, p)
print('{:.10f} {:.10f} {:.10f} {:.10f}'.format(p.real, p.imag, q.real, q.imag))


from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
import sys
import math
import bisect

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return [list(x) for x in sys.stdin.readline().split()]

def S():
	res = list(sys.stdin.readline())
	if res[-1] == '\n':
		return res[:-1]
	return res

def IR(n):
	return [I() for i in range(n)]

def LIR(n):
	return [LI() for i in range(n)]

def SR(n):
	return [S() for i in range(n)]

def LSR(n):
	return [LS() for i in range(n)]
sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():

	def D2(x1, y1, x2, y2):
		return (x1 - x2) ** 2 + (y1 - y2) ** 2

	def check(R1, R2, eps=1e-06):
		(x1, y1, r1) = R1
		(x2, y2, r2) = R2
		d2 = D2(x1, y1, x2, y2)
		if (r1 - r2) ** 2 <= d2 <= (r1 + r2) ** 2:
			return 1
		else:
			return 0

	def point(R1, R2):
		if not check(R1, R2):
			return []
		else:
			(x1, y1, r1) = R1
			(x2, y2, r2) = R2
			x2 -= x1
			y2 -= y1
			r = x2 ** 2 + y2 ** 2
			a = (r + r1 ** 2 - r2 ** 2) / 2
			d = (r * r1 ** 2 - a ** 2) ** 0.5
			(X, Y) = (a * x2 / r, a * y2 / r)
			k = d / r
			(X1, Y1) = (X + y2 * k + x1, Y - x2 * k + y1)
			(X2, Y2) = (X - y2 * k + x1, Y + x2 * k + y1)
			return [(X1, Y1), (X2, Y2)]
	r1 = LI()
	r2 = LI()
	(p1, p2) = point(r1, r2)
	if p2 < p1:
		(p1, p2) = (p2, p1)
	print(*p1, *p2)
	return
solve()


from sys import stdin
from operator import attrgetter
readline = stdin.readline

def cosine_formula(a, b, c):
	return (b ** 2 + c ** 2 - a ** 2) / (2 * b * c)

def unit(a):
	return a / abs(a)
import math

def main():
	(ax, ay, ar) = map(int, readline().split())
	(bx, by, br) = map(int, readline().split())
	(a, b) = (complex(ax, ay), complex(bx, by))
	ab = abs(b - a)
	ac = (ar ** 2 + ab ** 2 - br ** 2) / (2 * ab)
	c = a + (b - a) * (ac / ab)
	pc = math.sqrt(ar ** 2 - ac ** 2)
	(p, q) = (c + pc * unit(b - a) * 1j, c + pc * unit(b - a) * -1j)
	if p.real > q.real:
		(p, q) = (q, p)
	if abs(p.real - q.real) < 1e-06 and p.imag > q.imag:
		(p, q) = (q, p)
	print('{:.10f} {:.10f} {:.10f} {:.10f}'.format(p.real, p.imag, q.real, q.imag))
main()


import sys
from math import sin, cos, atan2, acos

class Circle(object):
	__slots__ = ('centre', 'radius')

	def __init__(self, centre=float('inf'), radius=-1):
		self.centre = complex(centre)
		self.radius = float(radius)

def arg(p_vector):
	return atan2(p_vector.imag, p_vector.real)

def polar(a, r):
	return cos(r) * a + sin(r) * a * 1j

def get_circles_cross_points(c1, c2):
	centre_distance = abs(c1.centre - c2.centre)
	a = acos((pow(c1.radius, 2) + pow(centre_distance, 2) - pow(c2.radius, 2)) / (2 * c1.radius * centre_distance))
	t = arg(c2.centre - c1.centre)
	(p1, p2) = (c1.centre + polar(c1.radius, t + a), c1.centre + polar(c1.radius, t - a))
	if p1.real < p2.real:
		ans = (p1, p2)
	elif p1.real == p2.real:
		if p1.imag < p2.imag:
			ans = (p1, p2)
		else:
			ans = (p2, p1)
	else:
		ans = (p2, p1)
	return ans

def solve(_circle_info):
	for (i, circle) in enumerate(_circle_info):
		(cx, cy, r) = map(int, circle)
		circles[i].centre = cx + cy * 1j
		circles[i].radius = r
	(cp1, cp2) = get_circles_cross_points(*circles)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
	return None
_input = sys.stdin.readlines()
circle_info = map(lambda x: x.split(), _input)
circles = [Circle() for _ in range(2)]
solve(circle_info)


import math

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __add__(self, other):
		return Point(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Point(self.x - other.x, self.y - other.y)

	def __mul__(self, other):
		return Point(self.x * other, self.y * other)

	def __truediv__(self, other):
		return Point(self.x / other, self.y / other)

	def __repr__(self):
		return str(round(self.x, 8)) + ' ' + str(round(self.y, 8))

	def __lt__(self, other):
		if self.x == other.x:
			return self.y < other.y
		else:
			return self.x < other.x

class Vector(Point):
	pass

class Line:

	def __init__(self, p1, p2):
		self.p1 = p1
		self.p2 = p2

class Segment(Line):
	pass

class Circle:

	def __init__(self, c, r):
		self.c = c
		self.r = r

def points_to_vector(p1, p2):
	x = p1.x - p2.x
	y = p1.y - p2.y
	return Vector(x, y)

def vector(p):
	return Vector(p.x, p.y)

def dot(v1, v2):
	return v1.x * v2.x + v1.y * v2.y

def cross(v1, v2):
	return v1.x * v2.y - v1.y * v2.x

def norm(v):
	return v.x ** 2 + v.y ** 2

def distance(v):
	return math.sqrt(norm(v))

def project(s, p):
	base = points_to_vector(s.p1, s.p2)
	hypo = points_to_vector(p, s.p1)
	r = dot(hypo, base) / norm(base)
	return s.p1 + base * r

def reflect(s, p):
	return p + (project(s, p) - p) * 2

def get_distance(s1, s2):
	if intersect_s(s1, s2):
		return 0
	d1 = get_distance_sp(s1, s2.p1)
	d2 = get_distance_sp(s1, s2.p2)
	d3 = get_distance_sp(s2, s1.p1)
	d4 = get_distance_sp(s2, s1.p2)
	return min(d1, min(d2, min(d3, d4)))

def get_distance_pp(p1, p2):
	return distance(p1 - p2)

def get_distance_lp(l, p):
	return abs(cross(l.p2 - l.p1, p - l.p1) / distance(l.p2 - l.p1))

def get_distance_sp(s, p):
	if dot(s.p2 - s.p1, p - s.p1) < 0:
		return distance(p - s.p1)
	elif dot(s.p1 - s.p2, p - s.p2) < 0:
		return distance(p - s.p2)
	else:
		return get_distance_lp(s, p)

def ccw(p0, p1, p2):
	EPS = 1e-10
	COUNTER_CLOCKWISE = 1
	CLOCKWISE = -1
	ONLINE_BACK = 2
	ONLINE_FRONT = -2
	ON_SEGMENT = 0
	v1 = p1 - p0
	v2 = p2 - p0
	if cross(v1, v2) > EPS:
		return COUNTER_CLOCKWISE
	elif cross(v1, v2) < -EPS:
		return CLOCKWISE
	elif dot(v1, v2) < -EPS:
		return ONLINE_BACK
	elif norm(v1) < norm(v2):
		return ONLINE_FRONT
	else:
		return ON_SEGMENT

def intersect_p(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

def intersect_s(s1, s2):
	return intersect_p(s1.p1, s1.p2, s2.p1, s2.p2)

def get_cross_point(s1, s2):
	base = s2.p2 - s2.p1
	d1 = abs(cross(base, s1.p1 - s2.p1))
	d2 = abs(cross(base, s1.p2 - s2.p1))
	t = d1 / (d1 + d2)
	return s1.p1 + (s1.p2 - s1.p1) * t

def get_cross_points(c, l):
	pr = project(l, c.c)
	e = (l.p2 - l.p1) / distance(l.p2 - l.p1)
	base = math.sqrt(c.r ** 2 - norm(pr - c.c))
	return (pr + e * base, pr - e * base)

def arg(p):
	return math.atan2(p.y, p.x)

def polar(a, r):
	return Point(math.cos(r) * a, math.sin(r) * a)

def get_cross_points_cirlces(c1, c2):
	d = distance(c1.c - c2.c)
	a = math.acos((c1.r ** 2 + d * d - c2.r ** 2) / (2 * c1.r * d))
	t = arg(c2.c - c1.c)
	return (c1.c + polar(c1.r, t + a), c1.c + polar(c1.r, t - a))
import sys
temp = list(map(int, input().split()))
c1 = Circle(Point(temp[0], temp[1]), temp[2])
temp = list(map(int, input().split()))
c2 = Circle(Point(temp[0], temp[1]), temp[2])
ans = get_cross_points_cirlces(c1, c2)
print(min(ans), max(ans))


import sys
from math import sqrt, atan2, acos, sin, cos
from sys import stdin
input = stdin.readline

class Point(object):
	epsilon = 1e-10

	def __init__(self, x=0.0, y=0.0):
		if isinstance(x, tuple):
			self.x = x[0]
			self.y = x[1]
		else:
			self.x = x
			self.y = y

	def __add__(self, other):
		return Point(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Point(self.x - other.x, self.y - other.y)

	def __mul__(self, other):
		return Point(other * self.x, other * self.y)

	def __truediv__(self, other):
		return Point(self.x / other, self.y / other)

	def __lt__(self, other):
		if self.x == other.x:
			return self.y < other.y
		else:
			return self.x < other.x

	def __eq__(self, other):
		from math import fabs
		if fabs(self.x - other.x) < Point.epsilon and fabs(self.y - other.y) < Point.epsilon:
			return True
		else:
			return False

	def norm(self):
		return self.x * self.x + self.y * self.y

	def __abs__(self):
		return sqrt(self.norm())

	def ccw(self, p0, p1):
		a = Vector(p1 - p0)
		b = Vector(self - p0)
		if Vector.cross(a, b) > Point.epsilon:
			return 1
		elif Vector.cross(a, b) < -Point.epsilon:
			return -1
		elif Vector.dot(a, b) < -Point.epsilon:
			return 2
		elif a.norm() < b.norm():
			return -2
		else:
			return 0

	def project(self, s):
		base = Vector(s.p2 - s.p1)
		a = Vector(self - s.p1)
		r = Vector.dot(a, base)
		r /= base.norm()
		return s.p1 + base * r

	def reflect(self, s):
		proj = self.project(s)
		return self + (proj - self) * 2

	def distance(self, s):
		if Vector.dot(s.p2 - s.p1, self - s.p1) < 0.0:
			return abs(self - s.p1)
		if Vector.dot(s.p1 - s.p2, self - s.p2) < 0.0:
			return abs(self - s.p2)
		return abs(Vector.cross(s.p2 - s.p1, self - s.p1) / abs(s.p2 - s.p1))

class Vector(Point):

	def __init__(self, x=0.0, y=0.0):
		if isinstance(x, tuple):
			self.x = x[0]
			self.y = x[1]
		elif isinstance(x, Point):
			self.x = x.x
			self.y = x.y
		else:
			self.x = x
			self.y = y

	def __add__(self, other):
		return Vector(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Vector(self.x - other.x, self.y - other.y)

	def __mul__(self, other):
		return Vector(other * self.x, other * self.y)

	def __truediv__(self, other):
		return Vector(other / self.x, other / self.y)

	@classmethod
	def dot(cls, a, b):
		return a.x * b.x + a.y * b.y

	@classmethod
	def cross(cls, a, b):
		return a.x * b.y - a.y * b.x

	@classmethod
	def is_orthogonal(cls, a, b):
		return Vector.dot(a, b) == 0.0

	@classmethod
	def is_parallel(cls, a, b):
		return Vector.cross(a, b) == 0.0

class Segment(object):

	def __init__(self, p1=Point(), p2=Point()):
		if isinstance(p1, Point):
			self.p1 = p1
			self.p2 = p2
		elif isinstance(p1, tuple):
			self.p1 = Point(p1[0], p1[1])
			self.p2 = Point(p2[0], p2[1])

	def intersect(self, s):
		ans1 = s.p1.ccw(self.p1, self.p2) * s.p2.ccw(self.p1, self.p2)
		ans2 = self.p1.ccw(s.p1, s.p2) * self.p2.ccw(s.p1, s.p2)
		return ans1 <= 0 and ans2 <= 0

	def cross_point(self, s):
		base = s.p2 - s.p1
		d1 = abs(Vector.cross(base, self.p1 - s.p1))
		d2 = abs(Vector.cross(base, self.p2 - s.p1))
		t = d1 / (d1 + d2)
		return self.p1 + (self.p2 - self.p1) * t

	def distance(self, s):
		if self.intersect(s):
			return 0.0
		d1 = s.p1.distance(self)
		d2 = s.p2.distance(self)
		d3 = self.p1.distance(s)
		d4 = self.p2.distance(s)
		return min(d1, d2, d3, d4)

	@classmethod
	def is_orthogonal(cls, s1, s2):
		a = Vector(s1.p2 - s1.p1)
		b = Vector(s2.p2 - s2.p1)
		return Vector.is_orthogonal(a, b)

	@classmethod
	def is_parallel(cls, s1, s2):
		a = Vector(s1.p2 - s1.p1)
		b = Vector(s2.p2 - s2.p1)
		return Vector.is_parallel(a, b)

class Line(Segment):
	pass

class Cirle(object):

	def __init__(self, x, y=Point(), r=1.0):
		if isinstance(x, Point):
			self.c = x
			self.r = y
		elif isinstance(x, tuple):
			self.c = Point(x[0], x[1])
			self.r = r

	def cross_points(self, s):
		if isinstance(s, Segment):
			pr = self.c.project(s)
			e = (s.p2 - s.p1) / abs(s.p2 - s.p1)
			base = sqrt(self.r * self.r - (pr - self.c).norm())
			return (pr + e * base, pr - e * base)
		elif isinstance(s, Cirle):
			c2 = s
			d = abs(self.c - c2.c)
			a = acos((self.r * self.r + d * d - c2.r * c2.r) / (2 * self.r * d))
			t = atan2(c2.c.y - self.c.y, c2.c.x - self.c.x)
			temp1 = Point(cos(t + a) * self.r, sin(t + a) * self.r)
			temp2 = Point(cos(t - a) * self.r, sin(t - a) * self.r)
			return (self.c + temp1, self.c + temp2)

def main(args):
	(x1, y1, r1) = map(int, input().split())
	c1 = Cirle(Point(x1, y1), r1)
	(x2, y2, r2) = map(int, input().split())
	c2 = Cirle(Point(x2, y2), r2)
	(ans1, ans2) = c1.cross_points(c2)
	if ans1.x < ans2.x:
		print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(ans1.x, ans1.y, ans2.x, ans2.y))
	elif ans1.x == ans2.x and ans1.y <= ans2.y:
		print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(ans1.x, ans1.y, ans2.x, ans2.y))
	else:
		print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(ans2.x, ans2.y, ans1.x, ans1.y))
main(sys.argv[1:])


import cmath
import itertools
import math
import os
import sys
from collections import defaultdict
if os.getenv('LOCAL'):
	sys.stdin = open('_in.txt', 'r')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
IINF = 10 ** 18
MOD = 10 ** 9 + 7
PI = cmath.pi
TAU = cmath.pi * 2
EPS = 1e-10

class Point:
	CCW_COUNTER_CLOCKWISE = 1
	CCW_CLOCKWISE = -1
	CCW_ONLINE_BACK = 2
	CCW_ONLINE_FRONT = -2
	CCW_ON_SEGMENT = 0

	def __init__(self, c: complex):
		self.c = c

	@property
	def x(self):
		return self.c.real

	@property
	def y(self):
		return self.c.imag

	@staticmethod
	def from_rect(x: float, y: float):
		return Point(complex(x, y))

	@staticmethod
	def from_polar(r: float, phi: float):
		return Point(cmath.rect(r, phi))

	def __add__(self, p):
		return Point(self.c + p.c)

	def __iadd__(self, p):
		self.c += p.c
		return self

	def __sub__(self, p):
		return Point(self.c - p.c)

	def __isub__(self, p):
		self.c -= p.c
		return self

	def __mul__(self, f: float):
		return Point(self.c * f)

	def __imul__(self, f: float):
		self.c *= f
		return self

	def __truediv__(self, f: float):
		return Point(self.c / f)

	def __itruediv__(self, f: float):
		self.c /= f
		return self

	def __repr__(self):
		return '({}, {})'.format(round(self.x, 10), round(self.y, 10))

	def __neg__(self):
		return Point(-self.c)

	def __eq__(self, p):
		return abs(self.c - p.c) < EPS

	def __abs__(self):
		return abs(self.c)

	@staticmethod
	def ccw(a, b, c):
		b = b - a
		c = c - a
		det = b.det(c)
		if det > EPS:
			return Point.CCW_COUNTER_CLOCKWISE
		if det < -EPS:
			return Point.CCW_CLOCKWISE
		if b.dot(c) < -EPS:
			return Point.CCW_ONLINE_BACK
		if c.norm() - b.norm() > EPS:
			return Point.CCW_ONLINE_FRONT
		return Point.CCW_ON_SEGMENT

	def dot(self, p):
		return self.x * p.x + self.y * p.y

	def det(self, p):
		return self.x * p.y - self.y * p.x

	def dist(self, p):
		return abs(self.c - p.c)

	def norm(self):
		return abs(self.c)

	def phase(self):
		return cmath.phase(self.c)

	def angle(self, p, q):
		return (cmath.phase(q.c - self.c) - cmath.phase(p.c - self.c) + PI) % TAU - PI

	def area(self, p, q):
		return abs((p - self).det(q - self) / 2)

	def projection_point(self, p, q, allow_outer=False):
		diff_q = q - p
		r = (self - p).dot(diff_q) / abs(diff_q)
		phase = diff_q.phase()
		ret = Point.from_polar(r, phase) + p
		if allow_outer or (p - ret).dot(q - ret) < EPS:
			return ret
		return None

	def reflection_point(self, p, q):
		r = abs(self - p)
		angle = p.angle(q, self)
		angle = (q - p).phase() - angle
		return Point.from_polar(r, angle) + p

	def on_segment(self, p, q, allow_side=True):
		if not allow_side and (self == p or self == q):
			return False
		return abs((p - self).det(q - self)) < EPS and (p - self).dot(q - self) < EPS

class Line:

	def __init__(self, a: float, b: float, c: float):
		self.a = a
		self.b = b
		self.c = c

	@staticmethod
	def from_gradient(grad: float, intercept: float):
		return Line(grad, -1, intercept)

	@staticmethod
	def from_segment(p1, p2):
		a = p2.y - p1.y
		b = p1.x - p2.x
		c = p2.y * (p2.x - p1.x) - p2.x * (p2.y - p1.y)
		return Line(a, b, c)

	@property
	def gradient(self):
		return INF if self.b == 0 else -self.a / self.b

	@property
	def intercept(self):
		return INF if self.b == 0 else -self.c / self.b

	def is_parallel_to(self, l):
		return abs(Point.from_rect(self.a, self.b).det(Point.from_rect(l.a, l.b))) < EPS

	def is_orthogonal_to(self, l):
		return abs(Point.from_rect(self.a, self.b).dot(Point.from_rect(l.a, l.b))) < EPS

	def intersection_point(self, l):
		(a1, b1, c1) = (self.a, self.b, self.c)
		(a2, b2, c2) = (l.a, l.b, l.c)
		det = a1 * b2 - a2 * b1
		if abs(det) < EPS:
			return None
		x = (b1 * c2 - b2 * c1) / det
		y = (a2 * c1 - a1 * c2) / det
		return Point.from_rect(x, y)

	def dist(self, p):
		raise NotImplementedError()

	def has_point(self, p):
		return abs(self.a * p.x + self.b * p.y + self.c) < EPS

class Segment:

	def __init__(self, p1, p2):
		self.p1 = p1
		self.p2 = p2

	def norm(self):
		return abs(self.p1 - self.p2)

	def phase(self):
		return (self.p2 - self.p1).phase()

	def is_parallel_to(self, s):
		return abs((self.p1 - self.p2).det(s.p1 - s.p2)) < EPS

	def is_orthogonal_to(self, s):
		return abs((self.p1 - self.p2).dot(s.p1 - s.p2)) < EPS

	def intersects_with(self, s, allow_side=True):
		if self.is_parallel_to(s):
			return s.p1.on_segment(self.p1, self.p2, allow_side) or s.p2.on_segment(self.p1, self.p2, allow_side) or self.p1.on_segment(s.p1, s.p2, allow_side) or self.p2.on_segment(s.p1, s.p2, allow_side)
		else:
			det_upper = EPS if allow_side else -EPS
			ok = True
			ok &= (self.p2 - self.p1).det(s.p1 - self.p1) * (self.p2 - self.p1).det(s.p2 - self.p1) < det_upper
			ok &= (s.p2 - s.p1).det(self.p1 - s.p1) * (s.p2 - s.p1).det(self.p2 - s.p1) < det_upper
			return ok

	def closest_point(self, p):
		d = (p - self.p1).dot(self.p2 - self.p1) / self.norm()
		if d < EPS:
			return self.p1
		if -EPS < d - self.norm():
			return self.p2
		return Point.from_polar(d, (self.p2 - self.p1).phase()) + self.p1

	def dist(self, p):
		return abs(p - self.closest_point(p))

	def dist_segment(self, s):
		if self.intersects_with(s):
			return 0.0
		return min(self.dist(s.p1), self.dist(s.p2), s.dist(self.p1), s.dist(self.p2))

	def has_point(self, p, allow_side=True):
		return p.on_segment(self.p1, self.p2, allow_side=allow_side)

class Polygon:

	def __init__(self, points):
		self.points = points

	def iter2(self):
		return zip(self.points, self.points[1:] + self.points[:1])

	def iter3(self):
		return zip(self.points, self.points[1:] + self.points[:1], self.points[2:] + self.points[:2])

	def area(self):
		dets = []
		for (p, q) in self.iter2():
			dets.append(p.det(q))
		return abs(math.fsum(dets)) / 2

	def is_convex(self, allow_straight=False, allow_collapsed=False):
		ccw = []
		for (a, b, c) in self.iter3():
			ccw.append(Point.ccw(a, b, c))
		ccw = set(ccw)
		if len(ccw) == 1:
			if ccw == {Point.CCW_CLOCKWISE}:
				return True
			if ccw == {Point.CCW_COUNTER_CLOCKWISE}:
				return True
		if allow_straight and len(ccw) == 2:
			if ccw == {Point.CCW_ONLINE_FRONT, Point.CCW_CLOCKWISE}:
				return True
			if ccw == {Point.CCW_ONLINE_FRONT, Point.CCW_COUNTER_CLOCKWISE}:
				return True
		if allow_collapsed and len(ccw) == 3:
			return ccw == {Point.CCW_ONLINE_FRONT, Point.CCW_ONLINE_BACK, Point.CCW_ON_SEGMENT}
		return False

	def has_point_on_edge(self, p):
		for (a, b) in self.iter2():
			if p.on_segment(a, b):
				return True
		return False

	def contains(self, p, allow_on_edge=True):
		angles = []
		for (a, b) in self.iter2():
			if p.on_segment(a, b):
				return allow_on_edge
			angles.append(p.angle(a, b))
		return abs(math.fsum(angles)) > EPS

	@staticmethod
	def convex_hull(points, allow_straight=False):
		points = points[:]
		points.sort(key=lambda p: (p.x, p.y))
		det_lower = -EPS if allow_straight else EPS
		sz = 0
		ret = [None] * (len(points) * 2)
		for p in points:
			while sz > 1 and (ret[sz - 1] - ret[sz - 2]).det(p - ret[sz - 1]) < det_lower:
				sz -= 1
			ret[sz] = p
			sz += 1
		floor = sz
		for p in reversed(points[:-1]):
			while sz > floor and (ret[sz - 1] - ret[sz - 2]).det(p - ret[sz - 1]) < det_lower:
				sz -= 1
			ret[sz] = p
			sz += 1
		ret = ret[:sz - 1]
		if allow_straight and len(ret) > len(points):
			ret = points
		return ret

	@staticmethod
	def diameter(points):
		points = Polygon.convex_hull(points, allow_straight=False)
		if len(points) == 1:
			return 0.0
		if len(points) == 2:
			return abs(points[0] - points[1])
		si = points.index(min(points, key=lambda p: (p.x, p.y)))
		sj = points.index(max(points, key=lambda p: (p.x, p.y)))
		n = len(points)
		ret = 0.0
		(i, j) = (si, sj)
		while i != sj or j != si:
			ret = max(ret, abs(points[i] - points[j]))
			ni = (i + 1) % n
			nj = (j + 1) % n
			if (points[ni] - points[i]).det(points[nj] - points[j]) > 0:
				j = nj
			else:
				i = ni
		return ret

	def convex_cut_by_line(self, line_p1, line_p2):
		n = len(self.points)
		line = Line.from_segment(line_p1, line_p2)
		on_line_points = []
		for (i, p) in enumerate(self.points):
			if line.has_point(p):
				on_line_points.append(i)
		has_on_line_edge = False
		if len(on_line_points) >= 3:
			has_on_line_edge = True
		elif len(on_line_points) == 2:
			has_on_line_edge = abs(on_line_points[0] - on_line_points[1]) in [1, n - 1]
		if has_on_line_edge:
			for p in self.points:
				ccw = Point.ccw(line_p1, line_p2, p)
				if ccw == Point.CCW_COUNTER_CLOCKWISE:
					return (Polygon(self.points[:]), None)
				if ccw == Point.CCW_CLOCKWISE:
					return (None, Polygon(self.points[:]))
		ret_lefts = []
		ret_rights = []
		d = line_p2 - line_p1
		for (p, q) in self.iter2():
			det_p = d.det(p - line_p1)
			det_q = d.det(q - line_p1)
			if det_p > -EPS:
				ret_lefts.append(p)
			if det_p < EPS:
				ret_rights.append(p)
			if det_p * det_q < -EPS:
				intersection = line.intersection_point(Line.from_segment(p, q))
				ret_lefts.append(intersection)
				ret_rights.append(intersection)
		l = Polygon(ret_lefts) if len(ret_lefts) > 1 else None
		r = Polygon(ret_rights) if len(ret_rights) > 1 else None
		return (l, r)

def closest_pair(points):
	assert len(points) >= 2

	def _rec(xsorted):
		n = len(xsorted)
		if n <= 2:
			return (xsorted[0].dist(xsorted[1]), (xsorted[0], xsorted[1]))
		if n <= 3:
			d = INF
			pair = None
			for (p, q) in itertools.combinations(xsorted, r=2):
				if p.dist(q) < d:
					d = p.dist(q)
					pair = (p, q)
			return (d, pair)
		(ld, lp) = _rec(xsorted[:n // 2])
		(rd, rp) = _rec(xsorted[n // 2:])
		if ld <= rd:
			d = ld
			ret_pair = lp
		else:
			d = rd
			ret_pair = rp
		mid_x = xsorted[n // 2].x
		mid_points = []
		for p in xsorted:
			if abs(p.x - mid_x) - d < -EPS:
				mid_points.append(p)
		mid_points.sort(key=lambda p: p.y)
		mid_n = len(mid_points)
		for i in range(mid_n - 1):
			j = i + 1
			p = mid_points[i]
			q = mid_points[j]
			while q.y - p.y - d < -EPS:
				pq_d = p.dist(q)
				if pq_d < d:
					d = pq_d
					ret_pair = (p, q)
				j += 1
				if j >= mid_n:
					break
				q = mid_points[j]
		return (d, ret_pair)
	return _rec(list(sorted(points, key=lambda p: p.x)))

def closest_pair_randomized(points):
	n = len(points)
	assert n >= 2
	if n == 2:
		return (points[0].dist(points[1]), (points[0], points[1]))
	import random
	points = points[:]
	random.shuffle(points)
	DELTA_XY = list(itertools.product([-1, 0, 1], repeat=2))
	grid = defaultdict(list)
	delta = INF
	dist = points[0].dist(points[1])
	ret_pair = (points[0], points[1])
	for i in range(2, n):
		if delta < EPS:
			return (0.0, ret_pair)
		if dist - delta < -EPS:
			delta = dist
			grid = defaultdict(list)
			for a in points[:i]:
				grid[a.x // delta, a.y // delta].append(a)
		else:
			p = points[i - 1]
			grid[p.x // delta, p.y // delta].append(p)
		p = points[i]
		dist = delta
		grid_x = p.x // delta
		grid_y = p.y // delta
		for (dx, dy) in DELTA_XY:
			for q in grid[grid_x + dx, grid_y + dy]:
				d = p.dist(q)
				if d - dist < -EPS:
					dist = d
					ret_pair = (p, q)
	return (min(delta, dist), ret_pair)

class Circle:

	def __init__(self, o, r):
		self.o = o
		self.r = r

	def __eq__(self, other):
		return self.o == other.o and abs(self.r - other.r) < EPS

	def ctc(self, c):
		if self.o == c.o:
			return INF if abs(self.r - c.r) < EPS else 0
		d = self.o.dist(c.o) - self.r - c.r
		if d > EPS:
			return 4
		elif d > -EPS:
			return 3
		elif d + min(self.r, c.r) * 2 > EPS:
			return 2
		elif d + min(self.r, c.r) * 2 > -EPS:
			return 1
		return 0

	def area(self):
		return self.r ** 2 * PI

	def intersection_points(self, other, allow_outer=False):
		if isinstance(other, Segment):
			return self.intersection_points_with_segment(other, allow_outer=allow_outer)
		if isinstance(other, Circle):
			return self.intersection_points_with_circle(other)
		raise NotImplementedError()

	def intersection_points_with_segment(self, s, allow_outer=False):
		projection_point = self.o.projection_point(s.p1, s.p2, allow_outer=True)
		dist = self.o.dist(projection_point)
		if dist - self.r > EPS:
			return []
		elif dist - self.r > -EPS:
			if allow_outer or s.has_point(projection_point):
				return [projection_point]
			else:
				return []
		diff = Point.from_polar(math.sqrt(self.r ** 2 - dist ** 2), s.phase())
		ret1 = projection_point + diff
		ret2 = projection_point - diff
		ret = []
		if allow_outer or s.has_point(ret1):
			ret.append(ret1)
		if allow_outer or s.has_point(ret2):
			ret.append(ret2)
		return ret

	def intersection_points_with_circle(self, other):
		ctc = self.ctc(other)
		if not 1 <= ctc <= 3:
			return []
		if ctc in (1, 3):
			return [Point.from_polar(self.r, (other.o - self.o).phase()) + self.o]
		assert ctc == 2
		a = other.r
		b = self.r
		c = self.o.dist(other.o)
		cos_a = (b ** 2 + c ** 2 - a ** 2) / (2 * b * c)
		angle = math.acos(cos_a)
		phi = (other.o - self.o).phase()
		return [self.o + Point.from_polar(self.r, phi + angle), self.o + Point.from_polar(self.r, phi - angle)]

def round_point(p):
	return (round(p.x, 8) + 0, round(p.y, 8) + 0)
(x1, y1, r1) = list(map(int, sys.stdin.buffer.readline().split()))
(x2, y2, r2) = list(map(int, sys.stdin.buffer.readline().split()))
c1 = Circle(Point(complex(x1, y1)), r1)
c2 = Circle(Point(complex(x2, y2)), r2)
ans = c1.intersection_points_with_circle(c2)
if len(ans) == 1:
	(x, y) = round_point(ans[0])
	print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(x, y, x, y))
elif len(ans) == 2:
	((x1, y1), (x2, y2)) = list(sorted(map(round_point, ans)))
	print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(x1, y1, x2, y2))
else:
	assert False


import collections
import math

class Vector2(collections.namedtuple('Vector2', ['x', 'y'])):

	def __add__(self, other):
		return Vector2(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Vector2(self.x - other.x, self.y - other.y)

	def __mul__(self, scalar):
		return Vector2(self.x * scalar, self.y * scalar)

	def __neg__(self):
		return Vector2(-self.x, -self.y)

	def __pos__(self):
		return Vector2(+self.x, +self.y)

	def __abs__(self):
		return math.sqrt(float(self.x * self.x + self.y * self.y))

	def __truediv__(self, scalar):
		return Vector2(self.x / scalar, self.y / scalar)

	def abs2(self):
		return float(self.x * self.x + self.y * self.y)

	def dot(self, other):
		return self.x * other.x + self.y * other.y

	def cross(self, other):
		return self.x * other.y - self.y * other.x

def getDistanceSP(segment, point):
	p = point
	(p1, p2) = segment
	if (p2 - p1).dot(p - p1) < 0:
		return abs(p - p1)
	if (p1 - p2).dot(p - p2) < 0:
		return abs(p - p2)
	return abs((p2 - p1).cross(p - p1)) / abs(p2 - p1)

def getDistance(s1, s2):
	(a, b) = s1
	(c, d) = s2
	if intersect(s1, s2):
		return 0
	return min(getDistanceSP(s1, c), getDistanceSP(s1, d), getDistanceSP(s2, a), getDistanceSP(s2, b))

def ccw(p0, p1, p2):
	a = p1 - p0
	b = p2 - p0
	if a.cross(b) > 0:
		return 1
	elif a.cross(b) < 0:
		return -1
	elif a.dot(b) < 0:
		return 2
	elif abs(a) < abs(b):
		return -2
	else:
		return 0

def intersect(s1, s2):
	(a, b) = s1
	(c, d) = s2
	return ccw(a, b, c) * ccw(a, b, d) <= 0 and ccw(c, d, a) * ccw(c, d, b) <= 0

def project(l, p):
	(p1, p2) = l
	base = p2 - p1
	hypo = p - p1
	return p1 + base * (hypo.dot(base) / abs(base) ** 2)

class Circle:

	def __init__(self, c, r):
		self.c = c
		self.r = r

def getCrossPoints(c, l):
	pr = project(l, c.c)
	(p1, p2) = l
	e = (p2 - p1) / abs(p2 - p1)
	base = math.sqrt(c.r * c.r - (pr - c.c).abs2())
	return [pr + e * base, pr - e * base]

def polar(r, a):
	return Vector2(r * math.cos(a), r * math.sin(a))

def getCrossPointsCircle(c1, c2):
	base = c2.c - c1.c
	d = abs(base)
	a = math.acos((c1.r ** 2 + d ** 2 - c2.r ** 2) / (2 * c1.r * d))
	t = math.atan2(base.y, base.x)
	return [c1.c + polar(c1.r, t + a), c1.c + polar(c1.r, t - a)]
(a, b, r) = map(int, input().split())
c1 = Circle(Vector2(a, b), r)
(a, b, r) = map(int, input().split())
c2 = Circle(Vector2(a, b), r)
ans = getCrossPointsCircle(c1, c2)
ans = sorted(ans, key=lambda x: (x.x, x.y))
print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(ans[0].x, ans[0].y, ans[1].x, ans[1].y))


import sys
sys.setrecursionlimit(10 ** 9)

def input():
	return sys.stdin.readline().strip()

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST():
	return list(map(int, input().split()))
INF = float('inf')

class Geometry:
	EPS = 10 ** (-9)

	def add(self, a, b):
		(x1, y1) = a
		(x2, y2) = b
		return (x1 + x2, y1 + y2)

	def sub(self, a, b):
		(x1, y1) = a
		(x2, y2) = b
		return (x1 - x2, y1 - y2)

	def mul(self, a, b):
		(x1, y1) = a
		if not isinstance(b, tuple):
			return (x1 * b, y1 * b)
		(x2, y2) = b
		return (x1 * x2, y1 * y2)

	def div(self, a, b):
		(x1, y1) = a
		if not isinstance(b, tuple):
			return (x1 / b, y1 / b)
		(x2, y2) = b
		return (x1 / x2, y1 / y2)

	def abs(self, a):
		from math import hypot
		(x1, y1) = a
		return hypot(x1, y1)

	def norm(self, a):
		(x, y) = a
		return x ** 2 + y ** 2

	def dot(self, a, b):
		(x1, y1) = a
		(x2, y2) = b
		return x1 * x2 + y1 * y2

	def cross(self, a, b):
		(x1, y1) = a
		(x2, y2) = b
		return x1 * y2 - y1 * x2

	def project(self, seg, p):
		(p1, p2) = seg
		base = self.sub(p2, p1)
		r = self.dot(self.sub(p, p1), base) / self.norm(base)
		return self.add(p1, self.mul(base, r))

	def reflect(self, seg, p):
		return self.add(p, self.mul(self.sub(self.project(seg, p), p), 2))

	def ccw(self, p0, p1, p2):
		a = self.sub(p1, p0)
		b = self.sub(p2, p0)
		if self.cross(a, b) > self.EPS:
			return 1
		if self.cross(a, b) < -self.EPS:
			return -1
		if self.dot(a, b) < -self.EPS:
			return 2
		if self.norm(a) < self.norm(b):
			return -2
		return 0

	def intersect(self, seg1, seg2):
		(p1, p2) = seg1
		(p3, p4) = seg2
		return self.ccw(p1, p2, p3) * self.ccw(p1, p2, p4) <= 0 and self.ccw(p3, p4, p1) * self.ccw(p3, p4, p2) <= 0

	def get_distance_LP(self, line, p):
		(p1, p2) = line
		return abs(self.cross(self.sub(p2, p1), self.sub(p, p1)) / self.abs(self.sub(p2, p1)))

	def get_distance_SP(self, seg, p):
		(p1, p2) = seg
		if self.dot(self.sub(p2, p1), self.sub(p, p1)) < 0:
			return self.abs(self.sub(p, p1))
		if self.dot(self.sub(p1, p2), self.sub(p, p2)) < 0:
			return self.abs(self.sub(p, p2))
		return self.get_distance_LP(seg, p)

	def get_distance_SS(self, seg1, seg2):
		(p1, p2) = seg1
		(p3, p4) = seg2
		if self.intersect(seg1, seg2):
			return 0
		return min(self.get_distance_SP(seg1, p3), self.get_distance_SP(seg1, p4), self.get_distance_SP(seg2, p1), self.get_distance_SP(seg2, p2))

	def get_cross_pointSS(self, seg1, seg2):
		(p1, p2) = seg1
		(p3, p4) = seg2
		base = self.sub(p4, p3)
		dist1 = abs(self.cross(base, self.sub(p1, p3)))
		dist2 = abs(self.cross(base, self.sub(p2, p3)))
		t = dist1 / (dist1 + dist2)
		return self.add(p1, self.mul(self.sub(p2, p1), t))

	def get_cross_pointCL(self, c, line):
		from math import sqrt
		(x, y, r) = c
		(p1, p2) = line
		pr = self.project(line, (x, y))
		e = self.div(self.sub(p2, p1), self.abs(self.sub(p2, p1)))
		base = sqrt(r * r - self.norm(self.sub(pr, (x, y))))
		return [self.add(pr, self.mul(e, base)), self.sub(pr, self.mul(e, base))]

	def arg(self, p):
		from math import atan2
		(x, y) = p
		return atan2(y, x)

	def polar(self, a, r):
		from math import sin, cos
		return (cos(r) * a, sin(r) * a)

	def get_cross_pointCC(self, c1, c2):
		from math import acos
		(x1, y1, r1) = c1
		(x2, y2, r2) = c2
		d = self.abs(self.sub((x1, y1), (x2, y2)))
		a = acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d))
		t = self.arg(self.sub((x2, y2), (x1, y1)))
		return [self.add((x1, y1), self.polar(r1, t + a)), self.add((x1, y1), self.polar(r1, t - a))]
gm = Geometry()
(x1, y1, r1) = MAP()
(x2, y2, r2) = MAP()
c1 = (x1, y1, r1)
c2 = (x2, y2, r2)
res = gm.get_cross_pointCC(c1, c2)
res.sort()
res = sum(res, ())
for i in range(3):
	print('{:.10f}'.format(res[i]), end=' ')
print('{:.10f}'.format(res[-1]))


from math import sqrt

def cross_point(circle1, circle2):
	(x1, y1, r1) = circle1
	(x2, y2, r2) = circle2
	if r1 < r2:
		(x1, x2) = (x2, x1)
		(y1, y2) = (y2, y1)
		(r1, r2) = (r2, r1)
	p1p2 = (x2 - x1, y2 - y1)
	np = norm(p1p2)
	if np > (r1 + r2) ** 2 or np < (r1 - r2) ** 2:
		return []
	else:
		lp = sqrt(np)
		a = (p1p2[0] / lp, p1p2[1] / lp)
		b = ((y1 - y2) / lp, (x2 - x1) / lp)
		h = sqrt((r1 + r2 + lp) * (-r1 + r2 + lp) * (r1 - r2 + lp) * (r1 + r2 - lp)) / (2 * lp)
		t = sqrt(r1 * r1 - h * h)
		if h < 1e-10:
			return [(x1 + t * a[0] + h * b[0], y1 + t * a[1] + h * b[1])]
		else:
			return [(x1 + t * a[0] + h * b[0], y1 + t * a[1] + h * b[1]), (x1 + t * a[0] - h * b[0], y1 + t * a[1] - h * b[1])]

def norm(v):
	(x, y) = v
	return x ** 2 + y ** 2

def run():
	c1 = [int(i) for i in input().split()]
	c2 = [int(i) for i in input().split()]
	ps = cross_point(c1, c2)
	if len(ps) == 0:
		raise ValueError('two circles do not intersect')
	if len(ps) == 1:
		ps *= 2
	(p1, p2) = ps
	if p1 > p2:
		(p1, p2) = (p2, p1)
	print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(*p1, *p2))
run()


(x1, y1, r1) = map(float, input().split())
(x2, y2, r2) = map(float, input().split())
(a, b) = (x2 - x1, y2 - y1)
d = (a ** 2 + b ** 2 + r1 ** 2 - r2 ** 2) / 2
x = (d * a + b * ((a ** 2 + b ** 2) * r1 ** 2 - d ** 2) ** 0.5) / (a ** 2 + b ** 2)
y = (d * b - a * ((a ** 2 + b ** 2) * r1 ** 2 - d ** 2) ** 0.5) / (a ** 2 + b ** 2)
z = (d * a - b * ((a ** 2 + b ** 2) * r1 ** 2 - d ** 2) ** 0.5) / (a ** 2 + b ** 2)
w = (d * b + a * ((a ** 2 + b ** 2) * r1 ** 2 - d ** 2) ** 0.5) / (a ** 2 + b ** 2)
if x < z:
	print(x1 + x, y1 + y, end=' ')
	print(x1 + z, y1 + w)
elif x > z:
	print(x1 + z, y1 + w, end=' ')
	print(x1 + x, y1 + y)
elif y < w:
	print(x1 + x, y1 + y, end=' ')
	print(x1 + z, y1 + w)
else:
	print(x1 + z, y1 + w, end=' ')
	print(x1 + x, y1 + y)


import sys
from operator import itemgetter, attrgetter
from itertools import starmap
import cmath
from math import isinf, sqrt, acos, atan2
readline = sys.stdin.readline
EPS = 1e-09
ONLINE_FRONT = -2
CLOCKWISE = -1
ON_SEGMENT = 0
COUNTER_CLOCKWISE = 1
ONLINE_BACK = 2

class Circle(object):
	__slots__ = ('c', 'r')

	def __init__(self, c, r):
		self.c = c
		self.r = r

class Segment(object):
	__slots__ = ('fi', 'se')

	def __init__(self, fi, se):
		self.fi = fi
		self.se = se
Line = Segment

def cross(a, b):
	return a.real * b.imag - a.imag * b.real

def dot(a, b):
	return a.real * b.real + a.imag * b.imag

def norm(base):
	return abs(base) ** 2

def project(s, p2):
	base = s.fi - s.se
	r = dot(p2 - s.fi, base) / norm(base)
	return s.fi + base * r

def reflect(s, p):
	return p + (project(s, p) - p) * 2.0

def ccw(p1, p2, p3):
	a = p2 - p1
	b = p3 - p1
	if cross(a, b) > EPS:
		return 1
	if cross(a, b) < -EPS:
		return -1
	if dot(a, b) < -EPS:
		return 2
	if norm(a) < norm(b):
		return -2
	return 0

def intersect4(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

def intersect2(s1, s2):
	return intersect4(s1.fi, s1.se, s2.fi, s2.se)

def getDistance(a, b):
	return abs(a - b)

def getDistanceLP(l, p):
	return abs(cross(l.se - l.fi, p - l.fi) / abs(l.se - l.fi))

def getDistanceSP(s, p):
	if dot(s.se - s.fi, p - s.fi) < 0.0:
		return abs(p - s.fi)
	if dot(s.fi - s.se, p - s.se) < 0.0:
		return abs(p - s.se)
	return getDistanceLP(s, p)

def getDistances(s1, s2):
	if intersect2(s1, s2):
		return 0.0
	return min(getDistanceSP(s1, s2.fi), getDistanceSP(s1, s2.se), getDistanceSP(s2, s1.fi), getDistanceSP(s2, s1.se))

def getCrossPoint(s1, s2):
	base = s2.se - s2.fi
	d1 = abs(cross(base, s1.fi - s2.fi))
	d2 = abs(cross(base, s1.se - s2.fi))
	t = d1 / (d1 + d2)
	return s1.fi + (s1.se - s1.fi) * t

def getCrossPoints(c, l):
	pr = project(l, c.c)
	e = (l.se - l.fi) / abs(l.se - l.fi)
	base = sqrt(c.r * c.r - norm(pr - c.c))
	return Segment(pr + e * base, pr - e * base)

def getCrossPointsCL(c, l):
	pr = project(l, c.c)
	e = (l.se - l.fi) / abs(l.se - l.fi)
	base = sqrt(c.r * c.r - norm(pr - c.c))
	return Segment(pr + e * base, pr - e * base)

def getCrossPointsCC(c1, c2):
	d = abs(c1.c - c2.c)
	a = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2.0 * c1.r * d))
	t = cmath.phase(c2.c - c1.c)
	return Segment(*sorted((c1.c + cmath.rect(c1.r, t + a), c1.c + cmath.rect(c1.r, t - a)), key=attrgetter('real', 'imag')))
(x, y, r) = map(int, readline().split())
c1 = Circle(complex(x, y), r)
(x, y, r) = map(int, readline().split())
c2 = Circle(complex(x, y), r)
cpc = getCrossPointsCC(c1, c2)
print(*map('{:.10f}'.format, (cpc.fi.real, cpc.fi.imag, cpc.se.real, cpc.se.imag)))


import math

class Vector:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __add__(self, other):
		return Vector(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Vector(self.x - other.x, self.y - other.y)

	def __mul__(self, scalar):
		return Vector(self.x * scalar, self.y * scalar)

	def __rmul__(self, scalar):
		return Vector(self.x * scalar, self.y * scalar)

	def __repr__(self):
		return str([self.x, self.y])

	def norm_2(self):
		return dot(self, self)

	def norm(self):
		return math.sqrt(self.norm_2())

def v_sum(v1, v2):
	return Vector(v1.x + v2.x, v1.y + v2.y)

def scalar_multi(k, v):
	return Vector(k * v.x, k * v.y)

def v_diff(v1, v2):
	return v_sum(v1, scalar_multi(-1, v2))

def dot(vector1, vector2):
	return vector1.x * vector2.x + vector1.y * vector2.y

def cross(vector1, vector2):
	return vector1.x * vector2.y - vector1.y * vector2.x
(cx1, cy1, r1) = map(int, input().split())
c1 = Vector(cx1, cy1)
(cx2, cy2, r2) = map(int, input().split())
c2 = Vector(cx2, cy2)
d = c2 - c1
cos = (r1 ** 2 + d.norm_2() - r2 ** 2) / (2 * r1 * d.norm())
h = r1 * cos / d.norm() * d + c1
l = r1 * math.sqrt(1 - cos ** 2)
n = Vector(d.y, -d.x)
a = h + l / n.norm() * n
b = h - l / n.norm() * n
if abs(a.x) < 10 ** (-9):
	a.x = 0
if abs(a.y) < 10 ** (-9):
	a.y = 0
if abs(b.x) < 10 ** (-9):
	b.x = 0
if abs(b.y) < 10 ** (-9):
	b.y = 0
if a.x < b.x:
	print('{} {} {} {}'.format(a.x, a.y, b.x, b.y))
elif a.x > b.x:
	print('{} {} {} {}'.format(b.x, b.y, a.x, a.y))
elif a.y < b.y:
	print('{} {} {} {}'.format(a.x, a.y, b.x, b.y))
else:
	print('{} {} {} {}'.format(b.x, b.y, a.x, a.y))


import sys
from math import sin, cos, atan2, acos
from operator import attrgetter

class Circle(object):
	__slots__ = ('centre', 'radius')

	def __init__(self, centre=float('inf'), radius=-1):
		self.centre = complex(centre)
		self.radius = float(radius)

def arg(p_vector):
	return atan2(p_vector.imag, p_vector.real)

def polar(a, r):
	return a * cos(r) + a * sin(r) * 1j

def get_circles_cross_points(c1, c2):
	centre_distance = abs(c1.centre - c2.centre)
	a = acos((pow(c1.radius, 2) + pow(centre_distance, 2) - pow(c2.radius, 2)) / (2 * c1.radius * centre_distance))
	t = arg(c2.centre - c1.centre)
	ans = [c1.centre + polar(c1.radius, t + a), c1.centre + polar(c1.radius, t - a)]
	ans.sort(key=attrgetter('real', 'imag'))
	return ans

def solve(_circle_info):
	for (i, circle) in enumerate(_circle_info):
		(cx, cy, r) = map(int, circle)
		circles[i].centre = cx + cy * 1j
		circles[i].radius = r
	(cp1, cp2) = get_circles_cross_points(*circles)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
	return None
_input = sys.stdin.readlines()
circle_info = map(lambda x: x.split(), _input)
circles = [Circle() for _ in range(2)]
solve(circle_info)


import sys
from operator import itemgetter, attrgetter
from itertools import starmap
import cmath
from math import isinf, sqrt, acos, atan2
readline = sys.stdin.readline
EPS = 1e-09
ONLINE_FRONT = -2
CLOCKWISE = -1
ON_SEGMENT = 0
COUNTER_CLOCKWISE = 1
ONLINE_BACK = 2

class Circle(object):
	__slots__ = ('c', 'r')

	def __init__(self, c, r):
		self.c = c
		self.r = r

class Segment(object):
	__slots__ = ('fi', 'se')

	def __init__(self, fi, se):
		self.fi = fi
		self.se = se
Line = Segment

def cross(a, b):
	return a.real * b.imag - a.imag * b.real

def dot(a, b):
	return a.real * b.real + a.imag * b.imag

def norm(base):
	return abs(base) ** 2

def project(s, p2):
	base = s.fi - s.se
	r = dot(p2 - s.fi, base) / norm(base)
	return s.fi + base * r

def reflect(s, p):
	return p + (project(s, p) - p) * 2.0

def ccw(p1, p2, p3):
	a = p2 - p1
	b = p3 - p1
	if cross(a, b) > EPS:
		return 1
	if cross(a, b) < -EPS:
		return -1
	if dot(a, b) < -EPS:
		return 2
	if norm(a) < norm(b):
		return -2
	return 0

def intersect4(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

def intersect2(s1, s2):
	return intersect4(s1.fi, s1.se, s2.fi, s2.se)

def getDistance(a, b):
	return abs(a - b)

def getDistanceLP(l, p):
	return abs(cross(l.se - l.fi, p - l.fi) / abs(l.se - l.fi))

def getDistanceSP(s, p):
	if dot(s.se - s.fi, p - s.fi) < 0.0:
		return abs(p - s.fi)
	if dot(s.fi - s.se, p - s.se) < 0.0:
		return abs(p - s.se)
	return getDistanceLP(s, p)

def getDistances(s1, s2):
	if intersect2(s1, s2):
		return 0.0
	return min(getDistanceSP(s1, s2.fi), getDistanceSP(s1, s2.se), getDistanceSP(s2, s1.fi), getDistanceSP(s2, s1.se))

def getCrossPoint(s1, s2):
	base = s2.se - s2.fi
	d1 = abs(cross(base, s1.fi - s2.fi))
	d2 = abs(cross(base, s1.se - s2.fi))
	t = d1 / (d1 + d2)
	return s1.fi + (s1.se - s1.fi) * t

def getCrossPointsCL(c, l):
	pr = project(l, c.c)
	e = (l.se - l.fi) / abs(l.se - l.fi)
	base = sqrt(c.r * c.r - norm(pr - c.c))
	return Segment(*sorted((pr + e * base, pr - e * base)), key=attrgetter('real', 'imag'))

def getCrossPointsCC(c1, c2):
	d = abs(c1.c - c2.c)
	a = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2.0 * c1.r * d))
	t = cmath.phase(c2.c - c1.c)
	return Segment(*sorted((c1.c + cmath.rect(c1.r, t + a), c1.c + cmath.rect(c1.r, t - a)), key=attrgetter('real', 'imag')))
(x, y, r) = map(int, readline().split())
c1 = Circle(complex(x, y), r)
(x, y, r) = map(int, readline().split())
c2 = Circle(complex(x, y), r)
cpc = getCrossPointsCC(c1, c2)
print(*map('{:.10f}'.format, (cpc.fi.real, cpc.fi.imag, cpc.se.real, cpc.se.imag)))


from math import sqrt, sin, cos, acos, atan2
(c1x, c1y, r1) = map(int, input().split())
(c2x, c2y, r2) = map(int, input().split())
c1 = [c1x, c1y]
c2 = [c2x, c2y]

def dot(a, b):
	return sum([i * j for (i, j) in zip(a, b)])

def add(a, b):
	return [a[0] + b[0], a[1] + b[1]]

def sub(a, b):
	return [a[0] - b[0], a[1] - b[1]]

def multi(k, a):
	return [k * a[0], k * a[1]]

def cross(a, b):
	return a[0] * b[1] - a[1] * b[0]

def norm(a):
	return sqrt(a[0] ** 2 + a[1] ** 2)

def proj(p, l):
	base = sub(l.p2, l.p1)
	hypo = sub(p, l.p1)
	t = dot(hypo, base) / norm(base)
	return add(l.p1, multi(t / norm(base), base))

def polar(a, r):
	return [cos(r) * a, sin(r) * a]
d = norm(sub(c2, c1))
a = acos((r1 ** 2 + d ** 2 - r2 ** 2) / (2 * r1 * d))
c2c1 = sub(c2, c1)
t = atan2(c2c1[1], c2c1[0])
ans1 = add(c1, polar(r1, t + a))
ans2 = add(c1, polar(r1, t - a))
ans = sorted([ans1] + [ans2], key=lambda x: (x[0], x[1]))
print(' '.join([str(round(i, 9)) for o in ans for i in o]))


from typing import List, Tuple
from math import sqrt, sin, cos, acos, atan2
from enum import IntEnum
EPS = 1e-10

def float_equal(x: float, y: float) -> bool:
	return abs(x - y) < EPS

class PointLocation(IntEnum):
	COUNTER_CLOCKWISE = 1
	CCW = 1
	CLOCKWISE = -1
	CW = -1
	ONLINE_BACK = 2
	O_B = 2
	ONLINE_FRONT = -2
	O_F = -2
	ON_SEGMENT = 0
	O_S = 0
PL = PointLocation

class Point:

	def __init__(self, x: float=0.0, y: float=0.0) -> None:
		self.x = x
		self.y = y

	def __repr__(self) -> str:
		return 'Point({}, {})'.format(self.x, self.y)

	def __eq__(self, other: object) -> bool:
		if not isinstance(other, Point):
			return NotImplemented
		return float_equal(self.x, other.x) and float_equal(self.y, other.y)

	def __add__(self, other: 'Point') -> 'Point':
		return Point(self.x + other.x, self.y + other.y)

	def __sub__(self, other: 'Point') -> 'Point':
		return Point(self.x - other.x, self.y - other.y)

	def __mul__(self, k: float) -> 'Point':
		return Point(self.x * k, self.y * k)

	def __rmul__(self, k: float) -> 'Point':
		return self * k

	def __truediv__(self, k: float) -> 'Point':
		return Point(self.x / k, self.y / k)

	def __lt__(self, other: 'Point') -> bool:
		return self.y < other.y if abs(self.x - other.x) < EPS else self.x < other.x

	@staticmethod
	def polar(a: float, r: float) -> 'Point':
		return Point(a * cos(r), a * sin(r))

	def arg(self) -> float:
		return atan2(self.y, self.x)

	def norm(self):
		return self.x * self.x + self.y * self.y

	def abs(self):
		return sqrt(self.norm())

	def dot(self, other: 'Point') -> float:
		return self.x * other.x + self.y * other.y

	def cross(self, other: 'Point') -> float:
		return self.x * other.y - self.y * other.x

	def is_orthogonal(self, other: 'Point') -> bool:
		return float_equal(self.dot(other), 0.0)

	def is_parallel(self, other: 'Point') -> bool:
		return float_equal(self.cross(other), 0.0)

	def distance(self, other: 'Point') -> float:
		return (self - other).abs()

	def in_side_of(self, seg: 'Segment') -> bool:
		return seg.vector().dot(Segment(seg.p1, self).vector()) >= 0

	def in_width_of(self, seg: 'Segment') -> bool:
		return self.in_side_of(seg) and self.in_side_of(seg.reverse())

	def distance_to_line(self, seg: 'Segment') -> float:
		return abs((self - seg.p1).cross(seg.vector())) / seg.length()

	def distance_to_segment(self, seg: 'Segment') -> float:
		if not self.in_side_of(seg):
			return self.distance(seg.p1)
		if not self.in_side_of(seg.reverse()):
			return self.distance(seg.p2)
		else:
			return self.distance_to_line(seg)

	def location(self, seg: 'Segment') -> PointLocation:
		p = self - seg.p1
		d = seg.vector().cross(p)
		if d > EPS:
			return PointLocation.COUNTER_CLOCKWISE
		if d < -EPS:
			return PointLocation.CLOCKWISE
		if seg.vector().dot(p) < 0.0:
			return PointLocation.ONLINE_BACK
		if seg.vector().norm() < p.norm():
			return PointLocation.ONLINE_FRONT
		return PointLocation.ON_SEGMENT
Vector = Point

class Segment:

	def __init__(self, p1: Point=None, p2: Point=None) -> None:
		self.p1: Point = Point() if p1 is None else p1
		self.p2: Point = Point() if p2 is None else p2

	def __repr__(self) -> str:
		return 'Segment({}, {})'.format(self.p1, self.p2)

	def __eq__(self, other: object) -> bool:
		if not isinstance(other, Segment):
			return NotImplemented
		return self.p1 == other.p1 and self.p2 == other.p2

	def vector(self) -> Vector:
		return self.p2 - self.p1

	def reverse(self) -> 'Segment':
		return Segment(self.p2, self.p1)

	def length(self) -> float:
		return self.p1.distance(self.p2)

	def is_orthogonal(self, other: 'Segment') -> bool:
		return self.vector().is_orthogonal(other.vector())

	def is_parallel(self, other: 'Segment') -> bool:
		return self.vector().is_parallel(other.vector())

	def projection(self, p: Point) -> Point:
		v = self.vector()
		vp = p - self.p1
		return v.dot(vp) / v.norm() * v + self.p1

	def reflection(self, p: Point) -> Point:
		x = self.projection(p)
		return p + 2 * (x - p)

	def intersects(self, other: 'Segment') -> bool:
		d0: PointLocation = self.p1.location(other)
		d1: PointLocation = self.p2.location(other)
		d2: PointLocation = other.p1.location(self)
		d3: PointLocation = other.p2.location(self)
		return d0 * d1 * d2 * d3 == 0 or (d0 * d1 == -1 and d2 * d3 == -1)

	def intersection(self, other: 'Segment') -> Point:
		a = self.vector()
		b = other.vector()
		c = self.p1 - other.p1
		s = b.cross(c) / a.cross(b)
		return self.p1 + s * a

	def distance_with_segment(self, other: 'Segment') -> float:
		if not self.is_parallel(other) and self.intersects(other):
			return 0
		else:
			return min(self.p1.distance_to_segment(other), self.p2.distance_to_segment(other), other.p1.distance_to_segment(self), other.p2.distance_to_segment(self))
Line = Segment

class Circle:

	def __init__(self, c: Point=None, r: float=0.0) -> None:
		self.c: Point = Point() if c is None else c
		self.r: float = r

	def __eq__(self, other: object) -> bool:
		if not isinstance(other, Circle):
			return NotImplemented
		return self.c == other.c and self.r == other.r

	def __repr__(self) -> str:
		return 'Circle({}, {})'.format(self.c, self.r)

	def cross_point_line(self, line: Line) -> List[Point]:
		proj = line.projection(self.c)
		dist = self.c.distance_to_line(line)
		tan = sqrt(self.r * self.r - dist * dist)
		u = line.vector() / line.vector().abs()
		return sorted([proj - tan * u, proj + tan * u])

	def cross_point_circle(self, other: 'Circle') -> List[Point]:
		vec = other.c - self.c
		d = vec.abs()
		r1 = self.r
		r2 = other.r
		a = acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d))
		t = (other.c - self.c).arg()
		return sorted([self.c + Vector.polar(self.r, t + a), self.c + Vector.polar(self.r, t - a)])

def main() -> None:
	(c1x, c1y, c1r) = [int(x) for x in input().split()]
	c1 = Circle(Point(c1x, c1y), c1r)
	(c2x, c2y, c2r) = [int(x) for x in input().split()]
	c2 = Circle(Point(c2x, c2y), c2r)
	(left, right) = c1.cross_point_circle(c2)
	print('{:.8f} {:.8f} {:.8f} {:.8f}'.format(left.x, left.y, right.x, right.y))
main()


import math

class Vector2:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __add__(self, v):
		return Vector2(self.x + v.x, self.y + v.y)

	def __sub__(self, v):
		return Vector2(self.x - v.x, self.y - v.y)

	def __mul__(self, v):
		return Vector2(self.x * v, self.y * v)

	def __truediv__(self, v):
		return Vector2(self.x / v, self.y / v)

	def __abs__(self):
		return math.sqrt(float(self.x * self.x + self.y * self.y))

	def __str__(self):
		return f'({self.x},{self.y})'

	def __lt__(self, v):
		if math.isclose(self.x, v.x):
			return self.y < v.y
		return self.x < v.x

	def dot(self, v):
		return self.x * v.x + self.y * v.y

	def cross(self, v):
		return self.x * v.y - self.y * v.x

	def norm(self):
		d = abs(self)
		return Vector2(self.x / d, self.y / d)

def projection(v1, v2, p):
	v12 = (v2 - v1).norm()
	v1p = p - v1
	d = v12.dot(v1p)
	return v1 + v12 * d

def distanceLP(v1, v2, p):
	return abs((v2 - v1).cross(p - v1)) / abs(v2 - v1)

def distanceSP(v1, v2, p):
	if (v2 - v1).dot(p - v1) < 0.0:
		return abs(p - v1)
	if (v1 - v2).dot(p - v2) < 0.0:
		return abs(p - v2)
	return distanceLP(v1, v2, p)

def ccw(p0, p1, p2):
	c = (p1 - p0).cross(p2 - p0)
	if math.isclose(c, 0.0, abs_tol=1e-10):
		d = (p1 - p0).dot(p2 - p0)
		if d < 0.0:
			return -1
		else:
			d1 = abs(p1 - p0)
			d2 = abs(p2 - p0)
			if d1 < d2:
				return 1
			else:
				return 0
	elif c < 0.0:
		return -1
	else:
		return 1

def intersect(p1, p2, p3, p4):
	c1 = ccw(p1, p2, p3) * ccw(p1, p2, p4)
	c2 = ccw(p3, p4, p1) * ccw(p3, p4, p2)
	return c1 <= 0.0 and c2 <= 0.0

def distance(a1, a2, b1, b2):
	if intersect(a1, a2, b1, b2):
		return 0.0
	return min([min([distanceSP(a1, a2, b1), distanceSP(a1, a2, b2)]), min([distanceSP(b1, b2, a1), distanceSP(b1, b2, a2)])])
(cx1, cy1, r1) = map(int, input().split())
(cx2, cy2, r2) = map(int, input().split())
c1 = Vector2(cx1, cy1)
c2 = Vector2(cx2, cy2)
c12 = c2 - c1
d = abs(c12)
a = math.acos((r1 * r1 + d * d - r2 * r2) / (2 * r1 * d))
t = math.atan2(c12.y, c12.x)
a1 = c1 + Vector2(math.cos(t + a) * r1, math.sin(t + a) * r1)
a2 = c1 + Vector2(math.cos(t - a) * r1, math.sin(t - a) * r1)
ans = ''
for a in sorted([a1, a2]):
	ans += f'{a.x:.8f} {a.y:.8f} '
print(ans.strip())


import math

class Vector:

	def __init__(self, x=None, y=None):
		self.x = x
		self.y = y

	def __add__(self, other):
		return Vector(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Vector(self.x - other.x, self.y - other.y)

	def __mul__(self, k):
		return Vector(self.x * k, self.y * k)

	def __truediv__(self, k):
		return Vector(self.x / k, self.y / k)

	def __gt__(self, other):
		return self.x > other.x and self.y > other.yb

	def __lt__(self, other):
		return self.x < other.x and self.y < other.yb

	def __eq__(self, other):
		return self.x == other.x and self.y == other.y

	def dot(self, other):
		return self.x * other.x + self.y * other.y

	def cross(self, other):
		return self.x * other.y - self.y * other.x

	def norm(self):
		return self.x * self.x + self.y * self.y

	def abs(self):
		return math.sqrt(self.norm())

	def rotate(self, theta):
		return Vector(self.x * math.cos(theta) - self.y * math.sin(theta), self.x * math.sin(theta) + self.y * math.cos(theta))

class Point(Vector):

	def __init__(self, *args, **kargs):
		return super().__init__(*args, **kargs)

class Segment:

	def __init__(self, p1=Point(0, 0), p2=Point(1, 1)):
		self.p1 = p1
		self.p2 = p2

class Line(Segment):

	def __init__(self, *args, **kargs):
		return super().__init__(*args, **kargs)

class Circle:

	def __init__(self, c=Point(0, 0), r=1):
		self.c = c
		self.r = r

def get_cross_point(c1, c2):
	v = c2.c - c1.c
	d = v.abs()
	assert d <= c1.r + c2.r
	a = math.acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d))
	return (c1.c + v.rotate(a) * (c1.r / d), c1.c + v.rotate(-a) * (c1.r / d))
(x1, y1, r1) = [int(i) for i in input().split()]
c1 = Circle(Point(x1, y1), r1)
(x2, y2, r2) = [int(i) for i in input().split()]
c2 = Circle(Point(x2, y2), r2)
(p1, p2) = get_cross_point(c1, c2)
(x1, y1) = min((p1.x, p1.y), (p2.x, p2.y))
(x2, y2) = max((p1.x, p1.y), (p2.x, p2.y))
print('{0:0.8f} {1:0.8f} {2:0.8f} {3:0.8f}'.format(x1, y1, x2, y2))


import math
EPS = 1e-10

def equals(a, b):
	return abs(a - b) < EPS

class Point:

	def __init__(self, x=0, y=0):
		self.x = x
		self.y = y

	def __add__(self, p):
		return Point(self.x + p.x, self.y + p.y)

	def __sub__(self, p):
		return Point(self.x - p.x, self.y - p.y)

	def __mul__(self, a):
		return Point(self.x * a, self.y * a)

	def __rmul__(self, a):
		return self * a

	def __truediv__(self, a):
		return Point(self.x / a, self.y / a)

	def norm(self):
		return self.x * self.x + self.y * self.y

	def abs(self):
		return math.sqrt(self.norm())

	def __lt__(self, p):
		if self.x != p.x:
			return self.x < p.x
		else:
			return self.y < p.y

	def __eq__(self, p):
		return equals(self.x, p.x) and equals(self.y, p.y)

class Segment:

	def __init__(self, p1, p2):
		self.p1 = p1
		self.p2 = p2

class Circle:

	def __init__(self, c=Point(), r=0):
		self.c = c
		self.r = r

def dot(a, b):
	return a.x * b.x + a.y * b.y

def cross(a, b):
	return a.x * b.y - a.y * b.x

def arg(p):
	return math.atan2(p.y, p.x)

def polar(r, a):
	return Point(math.cos(a) * r, math.sin(a) * r)

def getCrossPoints(c1, c2):
	d = (c1.c - c2.c).abs()
	a = math.acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d))
	t = arg(c2.c - c1.c)
	return (c1.c + polar(c1.r, t + a), c1.c + polar(c1.r, t - a))
(c1x, c1y, c1r) = [int(v) for v in input().split()]
(c2x, c2y, c2r) = [int(v) for v in input().split()]
c1 = Circle(Point(c1x, c1y), c1r)
c2 = Circle(Point(c2x, c2y), c2r)
(v1, v2) = getCrossPoints(c1, c2)
if v2 < v1:
	(v1, v2) = (v2, v1)
ans = [v1.x, v1.y, v2.x, v2.y]
print('{0[0]:.8f} {0[1]:.8f} {0[2]:.8f} {0[3]:.8f}'.format(ans))


from math import pi, cos, sin, atan2
EPS = 10 ** (-9)

def eq(value1, value2):
	return abs(value1 - value2) <= EPS

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y
		self.arg = atan2(y, x)

	def __str__(self):
		return '{0:.8f} {1:.8f}'.format(self.x, self.y)

	def __add__(self, other):
		return Point(self.x + other.x, self.y + other.y)

	def __sub__(self, other):
		return Point(self.x - other.x, self.y - other.y)

	def __mul__(self, scal):
		return Point(self.x * scal, self.y * scal)

	def __truediv__(self, scal):
		return Point(self.x / scal, self.y / scal)

	def __eq__(self, other):
		return eq(self.x, other.x) and eq(self.y, other.y)

	def __abs__(self):
		return (self.x ** 2 + self.y ** 2) ** 0.5

def Rotation(vec: Point, rad):
	return Point(vec.x * cos(rad) - vec.y * sin(rad), vec.x * sin(rad) + vec.y * cos(rad))

class Circle:

	def __init__(self, p, r):
		self.p = p
		self.r = r

class Line:

	def __init__(self, a, b):
		self.a = a
		self.b = b
		self.arg = (a - b).arg % pi

	def __str__(self):
		return '[({0}, {1}) - ({2}, {3})]'.format(self.a.x, self.a.y, self.b.x, self.b.y)

	def par(self, point):
		return Line(point, point + (self.a - self.b))

	def tan(self, point):
		return Line(point, point + Rotation(self.a - self.b, pi / 2))

class Segment(Line):

	def __init__(self, a, b):
		super().__init__(a, b)

def cross(vec1: Point, vec2: Point):
	return vec1.x * vec2.y - vec1.y * vec2.x

def dot(vec1: Point, vec2: Point):
	return vec1.x * vec2.x + vec1.y * vec2.y

def ccw(a, b, c):
	if cross(b - a, c - a) > EPS:
		return +1
	if cross(b - a, c - a) < -EPS:
		return -1
	if dot(c - a, b - a) < -EPS:
		return +2
	if abs(b - a) < abs(c - a):
		return -2
	return 0

def projection(l, p):
	t = dot(l.b - l.a, p - l.a) / abs(l.a - l.b) ** 2
	return l.a + (l.b - l.a) * t

def reflection(l, p):
	return p + (projection(l, p) - p) * 2

def isPararell(l1, l2):
	return eq(cross(l1.a - l1.b, l2.a - l2.b), 0)

def isVertical(l1, l2):
	return eq(dot(l1.a - l1.b, l2.a - l2.b), 0)

def isIntersect_lp(l, p):
	return abs(ccw(l.a, l.b, p)) != 1

def isIntersect_ll(l1, l2):
	return not isPararell(l1, l2) or isIntersect_lp(l1, l2.a)

def isIntersect_sp(s, p):
	return ccw(s.a, s.b, p) == 0

def isIntersect_ss(s1, s2):
	return ccw(s1.a, s1.b, s2.a) * ccw(s1.a, s1.b, s2.b) <= 0 and ccw(s2.a, s2.b, s1.a) * ccw(s2.a, s2.b, s1.b) <= 0

def isIntersect_ls(l, s):
	return cross(l.b - l.a, s.a - l.a) * cross(l.b - l.a, s.b - l.a) < EPS

def isIntersect_cp(c, p):
	return abs(abs(c.p - p) - c.r) < EPS

def isIntersect_cl(c, l):
	return distance_lp(l, c.p) <= c.r + EPS

def isIntersect_cs(c, s):
	pass

def intersect_cc(c1, c2):
	if c1.r < c2.r:
		(c1, c2) = (c2, c1)
	d = abs(c1.p - c2.p)
	if eq(c1.r + c2.r, d):
		return 3
	if eq(c1.r - c2.r, d):
		return 1
	if c1.r + c2.r < d:
		return 4
	if c1.r - c2.r < d:
		return 2
	return 0

def distance_pp(p1, p2):
	return abs(p1 - p2)

def distance_lp(l, p):
	return abs(projection(l, p) - p)

def distance_ll(l1, l2):
	return 0 if isIntersect_ll(l1, l2) else distance_lp(l1, l2.a)

def distance_sp(s, p):
	r = projection(s, p)
	if isIntersect_sp(s, r):
		return abs(r - p)
	return min(abs(s.a - p), abs(s.b - p))

def distance_ss(s1, s2):
	if isIntersect_ss(s1, s2):
		return 0
	return min([distance_sp(s1, s2.a), distance_sp(s1, s2.b), distance_sp(s2, s1.a), distance_sp(s2, s1.b)])

def distance_ls(l, s):
	if isIntersect_ls(l, s):
		return 0
	return min(distance_lp(l, s.a), distance_lp(l, s.b))

def crosspoint_ll(l1, l2):
	A = cross(l1.b - l1.a, l2.b - l2.a)
	B = cross(l1.b - l1.a, l1.b - l2.a)
	if eq(abs(A), 0) and eq(abs(B), 0):
		return l2.a
	return l2.a + (l2.b - l2.a) * B / A

def crosspoint_ss(s1, s2):
	return crosspoint_ll(s1, s2)

def crosspoint_lc(l, c):
	p = projection(l, c.p)
	if eq(distance_lp(l, c.p), c.r):
		return [p]
	e = (l.b - l.a) / abs(l.b - l.a)
	dis = (c.r ** 2 - abs(p - c.p) ** 2) ** 0.5
	return [p + e * dis, p - e * dis]

def crosspoint_sc(s, c):
	pass

def crosspoint_cc(c1, c2):
	d = abs(c1.p - c2.p)
	if not abs(c1.r - c2.r) <= d <= c1.r + c2.r:
		return []
	mid_p = (c2.p * (c1.r ** 2 - c2.r ** 2 + d ** 2) + c1.p * (c2.r ** 2 - c1.r ** 2 + d ** 2)) / (2 * d ** 2)
	tanvec = Rotation(c1.p - c2.p, pi / 2)
	return crosspoint_lc(Line(mid_p, mid_p + tanvec), c1)

def tangent_cp(c, p):
	return crosspoint_cc(c, Circle(p, (abs(p - c.p) ** 2 - c.r ** 2) ** 0.5))
import sys
input = sys.stdin.readline

def verify_1A():
	(p1x, p1y, p2x, p2y) = map(int, input().split())
	l = Line(Point(p1x, p1y), Point(p2x, p2y))
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (px, py) in Query:
		p = Point(px, py)
		print(projection(l, p))

def verify_1B():
	(p1x, p1y, p2x, p2y) = map(int, input().split())
	l = Line(Point(p1x, p1y), Point(p2x, p2y))
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (px, py) in Query:
		p = Point(px, py)
		print(reflection(l, p))

def verify_1C():
	(p1x, p1y, p2x, p2y) = map(int, input().split())
	p1 = Point(p1x, p1y)
	p2 = Point(p2x, p2y)
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (px, py) in Query:
		p = Point(px, py)
		result = ccw(p1, p2, p)
		if result == 1:
			print('COUNTER_CLOCKWISE')
		elif result == -1:
			print('CLOCKWISE')
		elif result == 2:
			print('ONLINE_BACK')
		elif result == -2:
			print('ONLINE_FRONT')
		else:
			print('ON_SEGMENT')

def verify_2A():
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) in Query:
		l1 = Line(Point(p0x, p0y), Point(p1x, p1y))
		l2 = Line(Point(p2x, p2y), Point(p3x, p3y))
		if isPararell(l1, l2):
			print(2)
		elif isVertical(l1, l2):
			print(1)
		else:
			print(0)

def verify_2B():
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) in Query:
		s1 = Segment(Point(p0x, p0y), Point(p1x, p1y))
		s2 = Segment(Point(p2x, p2y), Point(p3x, p3y))
		if isIntersect_ss(s1, s2):
			print(1)
		else:
			print(0)

def verify_2C():
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) in Query:
		s1 = Segment(Point(p0x, p0y), Point(p1x, p1y))
		s2 = Segment(Point(p2x, p2y), Point(p3x, p3y))
		print(crosspoint_ss(s1, s2))

def verify_2D():
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) in Query:
		s1 = Segment(Point(p0x, p0y), Point(p1x, p1y))
		s2 = Segment(Point(p2x, p2y), Point(p3x, p3y))
		print('{:.8f}'.format(distance_ss(s1, s2)))

def verify_7A():
	(c1x, c1y, c1r) = map(int, input().split())
	(c2x, c2y, c2r) = map(int, input().split())
	print(intersect_cc(Circle(Point(c1x, c1y), c1r), Circle(Point(c2x, c2y), c2r)))

def verify_7D():
	(cx, cy, cr) = map(int, input().split())
	c = Circle(Point(cx, cy), cr)
	Q = int(input())
	Query = [list(map(int, input().split())) for _ in range(Q)]
	for (x1, y1, x2, y2) in Query:
		Points = crosspoint_lc(Line(Point(x1, y1), Point(x2, y2)), c)
		if len(Points) == 1:
			Points.append(Points[-1])
		Points.sort(key=lambda p: p.y)
		Points.sort(key=lambda p: p.x)
		print(*Points)

def verify_7E():
	(c1x, c1y, c1r) = map(int, input().split())
	c1 = Circle(Point(c1x, c1y), c1r)
	(c2x, c2y, c2r) = map(int, input().split())
	c2 = Circle(Point(c2x, c2y), c2r)
	Points = crosspoint_cc(c1, c2)
	if len(Points) == 1:
		Points.append(Points[-1])
	Points.sort(key=lambda p: p.y)
	Points.sort(key=lambda p: p.x)
	print(*Points)
verify_7E()


import sys
from math import sin, cos, atan2, acos

class Circle(object):
	__slots__ = ('centre', 'radius')

	def __init__(self, centre=float('inf'), radius=-1):
		self.centre = complex(centre)
		self.radius = float(radius)

def arg(p_vector):
	return atan2(p_vector.imag, p_vector.real)

def polar(a, r):
	return a * cos(r) + a * sin(r) * 1j

def get_circles_cross_points(c1, c2):
	centre_distance = abs(c1.centre - c2.centre)
	a = acos((pow(c1.radius, 2) + pow(centre_distance, 2) - pow(c2.radius, 2)) / (2 * c1.radius * centre_distance))
	t = arg(c2.centre - c1.centre)
	(p1, p2) = (c1.centre + polar(c1.radius, t + a), c1.centre + polar(c1.radius, t - a))
	if p1.real < p2.real:
		ans = (p1, p2)
	elif p1.real == p2.real:
		if p1.imag < p2.imag:
			ans = (p1, p2)
		else:
			ans = (p2, p1)
	else:
		ans = (p2, p1)
	return ans

def solve(_circle_info):
	for (i, circle) in enumerate(_circle_info):
		(cx, cy, r) = map(int, circle)
		circles[i].centre = cx + cy * 1j
		circles[i].radius = r
	(cp1, cp2) = get_circles_cross_points(*circles)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
	return None
_input = sys.stdin.readlines()
circle_info = map(lambda x: x.split(), _input)
circles = [Circle() for _ in range(2)]
solve(circle_info)


import sys
from operator import itemgetter, attrgetter
from itertools import starmap
import cmath
from math import isinf, sqrt, acos, atan2
readline = sys.stdin.readline
EPS = 1e-09
ONLINE_FRONT = -2
CLOCKWISE = -1
ON_SEGMENT = 0
COUNTER_CLOCKWISE = 1
ONLINE_BACK = 2

class Circle(object):
	__slots__ = ('c', 'r')

	def __init__(self, c, r):
		self.c = c
		self.r = r

class Segment(object):
	__slots__ = ('fi', 'se')

	def __init__(self, fi, se):
		self.fi = fi
		self.se = se
Line = Segment

def cross(a, b):
	return a.real * b.imag - a.imag * b.real

def dot(a, b):
	return a.real * b.real + a.imag * b.imag

def norm(base):
	return abs(base) ** 2

def project(s, p2):
	base = s.fi - s.se
	r = dot(p2 - s.fi, base) / norm(base)
	return s.fi + base * r

def reflect(s, p):
	return p + (project(s, p) - p) * 2.0

def ccw(p1, p2, p3):
	a = p2 - p1
	b = p3 - p1
	if cross(a, b) > EPS:
		return 1
	if cross(a, b) < -EPS:
		return -1
	if dot(a, b) < -EPS:
		return 2
	if norm(a) < norm(b):
		return -2
	return 0

def intersect4(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

def intersect2(s1, s2):
	return intersect4(s1.fi, s1.se, s2.fi, s2.se)

def getDistance(a, b):
	return abs(a - b)

def getDistanceLP(l, p):
	return abs(cross(l.se - l.fi, p - l.fi) / abs(l.se - l.fi))

def getDistanceSP(s, p):
	if dot(s.se - s.fi, p - s.fi) < 0.0:
		return abs(p - s.fi)
	if dot(s.fi - s.se, p - s.se) < 0.0:
		return abs(p - s.se)
	return getDistanceLP(s, p)

def getDistances(s1, s2):
	if intersect2(s1, s2):
		return 0.0
	return min(getDistanceSP(s1, s2.fi), getDistanceSP(s1, s2.se), getDistanceSP(s2, s1.fi), getDistanceSP(s2, s1.se))

def getCrossPoint(s1, s2):
	base = s2.se - s2.fi
	d1 = abs(cross(base, s1.fi - s2.fi))
	d2 = abs(cross(base, s1.se - s2.fi))
	t = d1 / (d1 + d2)
	return s1.fi + (s1.se - s1.fi) * t

def getCrossPoints(c, l):
	pr = project(l, c.c)
	e = (l.se - l.fi) / abs(l.se - l.fi)
	base = sqrt(c.r * c.r - norm(pr - c.c))
	return Segment(pr + e * base, pr - e * base)

def getCrossPointsCL(c, l):
	pr = project(l, c.c)
	e = (l.se - l.fi) / abs(l.se - l.fi)
	base = sqrt(c.r * c.r - norm(pr - c.c))
	return Segment(pr + e * base, pr - e * base)

def getCrossPointsCC(c1, c2):
	d = abs(c1.c - c2.c)
	a = acos((c1.r * c1.r + d * d - c2.r * c2.r) / (2.0 * c1.r * d))
	t = cmath.phase(c2.c - c1.c)
	return Segment(c1.c + cmath.rect(c1.r, t + a), c1.c + cmath.rect(c1.r, t - a))
(x, y, r) = map(int, readline().split())
c1 = Circle(complex(x, y), r)
(x, y, r) = map(int, readline().split())
c2 = Circle(complex(x, y), r)
cpc = getCrossPointsCC(c1, c2)
if cpc.se.real < cpc.fi.real or (cpc.se.real == cpc.fi.real and cpc.se.imag < cpc.fi.imag):
	(cpc.fi, cpc.se) = (cpc.se, cpc.fi)
print(*map('{:.10f}'.format, (cpc.fi.real, cpc.fi.imag, cpc.se.real, cpc.se.imag)))


from functools import singledispatch
import math
EPS = 1e-10
COUNTER_CLOCKWISE = 1
CLOCKWISE = -1
ONLINE_BACK = 2
ONLINE_FRONT = -2
ON_SEGMENT = 0

class Segment:

	def __init__(self, p1, p2):
		self.p1 = p1
		self.p2 = p2

class Circle:

	def __init__(self, c, r):
		self.c = c
		self.r = r

class Point:

	def __init__(self, x, y):
		self.x = x
		self.y = y

	def __add__(self, point):
		return Point(self.x + point.x, self.y + point.y)

	def __sub__(self, point):
		return Point(self.x - point.x, self.y - point.y)

	def __mul__(self, a):
		return Point(a * self.x, a * self.y)

	def __truediv__(self, a):
		return Point(self.x / a, self.y / a)

	def __abs__(self):
		return math.sqrt(self.norm())

	def norm(self):
		return self.x ** 2 + self.y ** 2

	def __eq__(self, point):
		return abs(self.x - point.x) < EPS and abs(self.y - point.y) < EPS

def dot(a, b):
	return a.x * b.x + a.y * b.y

def cross(a, b):
	return a.x * b.y - a.y * b.x

def isOrthogonal(a, b):
	return dot(a, b) == 0

def isParallel(a, b):
	return cross(a, b) == 0

def project(s, p):
	base = s.p2 - s.p1
	r = dot(p - s.p1, base) / base.norm()
	return s.p1 + base * r

def reflect(s, p):
	return p + (project(s, p) - p) * 2

@singledispatch
def get_distance(a, b):
	return abs(a - b)

def get_distance_lp(l, p):
	return abs(cross(l.p2 - l.p1, p - l.p1) / abs(l.p2 - l.p1))

def get_distance_sp(s, p):
	if dot(s.p2 - s.p1, p - s.p1) < 0:
		return abs(p - s.p1)
	if dot(s.p1 - s.p2, p - s.p2) < 0:
		return abs(p - s.p2)
	return get_distance_lp(s, p)

@get_distance.register(Segment)
def _(s1, s2):
	if intersect(s1, s2):
		return 0
	return min([get_distance_sp(s1, s2.p1), get_distance_sp(s1, s2.p2), get_distance_sp(s2, s1.p1), get_distance_sp(s2, s1.p2)])

def ccw(p0, p1, p2):
	a = p1 - p0
	b = p2 - p0
	if cross(a, b) > EPS:
		return COUNTER_CLOCKWISE
	if cross(a, b) < -EPS:
		return CLOCKWISE
	if dot(a, b) < -EPS:
		return ONLINE_BACK
	if a.norm() < b.norm():
		return ONLINE_FRONT
	return ON_SEGMENT

@singledispatch
def intersect(p1, p2, p3, p4):
	return ccw(p1, p2, p3) * ccw(p1, p2, p4) <= 0 and ccw(p3, p4, p1) * ccw(p3, p4, p2) <= 0

@intersect.register(Segment)
def _(s1, s2):
	return intersect(s1.p1, s1.p2, s2.p1, s2.p2)

def get_cross_point(s1, s2):
	base = s2.p2 - s2.p1
	d1 = abs(cross(base, s1.p1 - s2.p1))
	d2 = abs(cross(base, s1.p2 - s2.p1))
	t = d1 / (d1 + d2)
	return s1.p1 + (s1.p2 - s1.p1) * t

def get_cross_points(c, l):
	pr = project(l, c.c)
	e = (l.p2 - l.p1) / abs(l.p2 - l.p1)
	base = (c.r ** 2 - (pr - c.c).norm()) ** 0.5
	return (pr + e * base, pr - e * base)

def arg(p):
	return math.atan2(p.y, p.x)

def polar(a, r):
	return Point(math.cos(r) * a, math.sin(r) * a)

def get_cross_points_(c1, c2):
	d = abs(c1.c - c2.c)
	a = math.acos((c1.r ** 2 + d ** 2 - c2.r ** 2) / (2 * c1.r * d))
	t = arg(c2.c - c1.c)
	return (c1.c + polar(c1.r, t + a), c1.c + polar(c1.r, t - a))
from sys import stdin
input = stdin.readline
(cx, cy, r) = map(int, input().split())
center = Point(cx, cy)
c1 = Circle(center, r)
(cx, cy, r) = map(int, input().split())
center = Point(cx, cy)
c2 = Circle(center, r)
(ans1, ans2) = get_cross_points_(c1, c2)
for ans in [ans1, ans2]:
	if round(ans.x, 10) == 0:
		ans.x = 0
	if round(ans.y, 10) == 0:
		ans.y = 0
if ans1.x < ans2.x or (ans1.x == ans2.x and ans1.y < ans2.y):
	print(ans1.x, ans1.y, ans2.x, ans2.y)
else:
	print(ans2.x, ans2.y, ans1.x, ans1.y)


import sys
from math import pi, sin, cos, atan2, acos

class Circle(object):
	__slots__ = ('centre', 'radius')

	def __init__(self, centre=float('inf'), radius=-1):
		self.centre = complex(centre)
		self.radius = float(radius)

def arg(p_vector):
	return atan2(p_vector.imag, p_vector.real)

def polar(a, r):
	return cos(r) * a + sin(r) * a * 1j

def get_circles_cross_points(c1, c2):
	centre_distance = abs(c1.centre - c2.centre)
	a = acos((pow(c1.radius, 2) + pow(centre_distance, 2) - pow(c2.radius, 2)) / (2 * c1.radius * centre_distance))
	t = arg(c2.centre - c1.centre)
	(p1, p2) = (c1.centre + polar(c1.radius, t + a), c1.centre + polar(c1.radius, t - a))
	if p1.real < p2.real:
		ans = (p1, p2)
	elif p1.real == p2.real:
		if p1.imag < p2.imag:
			ans = (p1, p2)
		else:
			ans = (p2, p1)
	else:
		ans = (p2, p1)
	return ans

def solve(_circle_info):
	for (i, circle) in enumerate(_circle_info):
		(cx, cy, r) = map(int, circle)
		circles[i].centre = cx + cy * 1j
		circles[i].radius = r
	(cp1, cp2) = get_circles_cross_points(*circles)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
	return None
_input = sys.stdin.readlines()
circle_info = map(lambda x: x.split(), _input)
circles = [Circle() for _ in range(2)]
solve(circle_info)


from math import sqrt
(c1x, c1y, c1r) = map(float, input().split())
(c2x, c2y, c2r) = map(float, input().split())
(dx, dy) = (c2x - c1x, c2y - c1y)
cdist = dx ** 2 + dy ** 2
a = (cdist + c1r ** 2 - c2r ** 2) / 2
df = sqrt(cdist * c1r ** 2 - a ** 2)
(ix1, ix2) = ((a * dx + dy * df) / cdist, (a * dx - dy * df) / cdist)
(iy1, iy2) = ((a * dy - dx * df) / cdist, (a * dy + dx * df) / cdist)
if (ix1, iy1) > (ix2, iy2):
	(ix1, ix2, iy1, iy2) = (ix2, ix1, iy2, iy1)
print(ix1 + c1x, iy1 + c1y, ix2 + c1x, iy2 + c1y)


import math
EPS = 10 ** (-9)

def is_equal(a, b):
	return abs(a - b) < EPS

def norm(v, i=2):
	ret = 0
	n = len(v)
	for j in range(n):
		ret += abs(v[j]) ** i
	return math.pow(ret, 1 / i)

class Vector(list):

	def __add__(self, other):
		n = len(self)
		ret = [0] * n
		for i in range(n):
			ret[i] = super().__getitem__(i) + other.__getitem__(i)
		return self.__class__(ret)

	def __radd__(self, other):
		n = len(self)
		ret = [0] * n
		for i in range(n):
			ret[i] = other.__getitem__(i) + super().__getitem__(i)
		return self.__class__(ret)

	def __iadd__(self, other):
		n = len(self)
		for i in range(n):
			self[i] += other.__getitem__(i)
		return self

	def __sub__(self, others):
		n = len(self)
		ret = [0] * n
		for i in range(n):
			ret[i] = super().__getitem__(i) - others.__getitem__(i)
		return self.__class__(ret)

	def __isub__(self, other):
		n = len(self)
		for i in range(n):
			self[i] -= other.__getitem__(i)
		return self

	def __rsub__(self, others):
		n = len(self)
		ret = [0] * n
		for i in range(n):
			ret[i] = others.__getitem__(i) - super().__getitem__(i)
		return self.__class__(ret)

	def __mul__(self, other):
		n = len(self)
		if isinstance(other, list):
			ret = 0
			for i in range(n):
				ret += super().__getitem__(i) * other.__getitem__(i)
			return ret
		else:
			ret = [0] * n
			for i in range(n):
				ret[i] = super().__getitem__(i) * other
			return self.__class__(ret)

	def __rmul__(self, other):
		n = len(self)
		if isinstance(other, list):
			ret = 0
			for i in range(n):
				ret += super().__getitem__(i) * other.__getitem__(i)
			return ret
		else:
			ret = [0] * n
			for i in range(n):
				ret[i] = super().__getitem__(i) * other
			return self.__class__(ret)

	def __truediv__(self, other):
		n = len(self)
		ret = [0] * n
		for i in range(n):
			ret[i] = super().__getitem__(i) / other
		return self.__class__(ret)

	def norm(self, i):
		return norm(self, i)

	def __pow__(self, other):
		n = len(self)
		ret = [0] * 3
		x = self[:]
		y = other[:]
		if n == 2:
			x.append(0)
			y.append(0)
		if n == 2 or n == 3:
			for i in range(3):
				(ret[0], ret[1], ret[2]) = (x[1] * y[2] - x[2] * y[1], x[2] * y[0] - x[0] * y[2], x[0] * y[1] - x[1] * y[0])
			ret = Vector(ret)
			if n == 2:
				return ret
			else:
				return ret

	def angle(self):
		if len(self) != 2:
			return False
		elif is_equal(super().__getitem__(0), 0) and is_equal(super().__getitem__(1), 0):
			return False
		elif is_equal(super().__getitem__(0), 0):
			if super().__getitem__(1) > 0:
				return math.pi / 2
			elif super().__getitem__(1) < 0:
				return -math.pi / 2
		elif super().__getitem__(0) > 0:
			return math.atan(super().__getitem__(1) / super().__getitem__(0))
		elif super().__getitem__(0) < 0:
			return math.atan(super().__getitem__(1) / super().__getitem__(0)) + math.pi

class Segment:

	def __init__(self, v1, v2):
		if v2[0] < v1[0]:
			(v1, v2) = (v2, v1)
		self.v1 = v1
		self.v2 = v2

	def length(self):
		return norm(self.v1 - self.v2)

	def get_unit_vec(self):
		dist = norm(self.v2 - self.v1)
		if dist != 0:
			return (self.v2 - self.v1) / dist
		else:
			return False

	def projection(self, vector):
		unit_vec = self.get_unit_vec()
		t = unit_vec * (vector - self.v1)
		return self.v1 + t * unit_vec

	def is_vertical(self, other):
		return is_equal(0, self.get_unit_vec() * other.get_unit_vec())

	def is_horizontal(self, other):
		return is_equal(0, self.get_unit_vec() ** other.get_unit_vec())

	def reflection(self, vector):
		projection = self.projection(vector)
		v = projection - vector
		return projection + vector

	def include(self, vector):
		proj = self.projection(vector)
		if not is_equal(norm(proj - vector), 0):
			return False
		else:
			n = len(self.v1)
			f = True
			for i in range(n):
				f &= self.v1[i] <= vector[i] <= self.v2[i] or self.v2[i] <= vector[i] <= self.v1[i]
			return f

	def distance(self, other):
		if isinstance(other, Vector):
			proj = self.projection(other)
			if self.include(proj):
				return norm(proj - other)
			else:
				ret = []
				ret.append(norm(self.v1 - other))
				ret.append(norm(self.v2 - other))
				return min(ret)

	def ccw(self, vector):
		direction = self.v2 - self.v1
		v = vector - self.v1
		if self.include(vector):
			return 0
		else:
			cross = direction ** v
			if cross[2] <= 0:
				return 1
			else:
				return -1

	def intersect(self, segment):
		ccw12 = self.ccw(segment.v1)
		ccw13 = self.ccw(segment.v2)
		ccw20 = segment.ccw(self.v1)
		ccw21 = segment.ccw(self.v2)
		if ccw12 * ccw13 * ccw20 * ccw21 == 0:
			return True
		elif ccw12 * ccw13 < 0 and ccw20 * ccw21 < 0:
			return True
		else:
			return False

	def intersect_point(self, segment):
		d1 = norm(self.projection(segment.v1) - segment.v1)
		d2 = norm(self.projection(segment.v2) - segment.v2)
		return segment.v1 + d1 / (d1 + d2) * (segment.v2 - segment.v1)

	def angle(self):
		if is_equal(self.v2[0] - self.v1[0], 0):
			return math.pi / 2
		else:
			return math.atan((self.v2[1] - self.v1[1]) / (self.v2[0] - self.v1[0]))

class Line(Segment):

	def include(self, vector):
		proj = self.projection(vector)
		return is_equal(norm(proj - vector), 0)

	def distance(self, vector):
		return norm(self.projection(vector) - vector)

class Circle:

	def __init__(self, vector, r):
		self.c = vector
		self.r = r

	def intersect_point(self, other):
		if isinstance(other, Line):
			if other.distance(self.c) > self.r:
				return False
			else:
				d = other.distance(self.c)
				proj = other.projection(self.c)
				unit_v = other.get_unit_vec()
				t = (self.r ** 2 - d ** 2) ** 0.5
				return (proj + t * unit_v, proj - t * unit_v)
		if isinstance(other, Circle):
			if norm(self.c - other.c) > self.r + other.r:
				return False
			else:
				d = norm(self.c - other.c)
				alpha = math.acos((self.r ** 2 + d ** 2 - other.r ** 2) / (2 * d * self.r))
				L = other.c - self.c
				theta = L.angle()
				to1 = self.r * Vector([math.cos(theta + alpha), math.sin(theta + alpha)])
				to2 = self.r * Vector([math.cos(theta - alpha), math.sin(theta - alpha)])
				return (self.c + to1, self.c + to2)
(x1, y1, r1) = list(map(int, input().split()))
(x2, y2, r2) = list(map(int, input().split()))
circle1 = Circle(Vector([x1, y1]), r1)
circle2 = Circle(Vector([x2, y2]), r2)
(p1, p2) = circle1.intersect_point(circle2)
if p2[0] < p1[0]:
	(p1, p2) = (p2, p1)
elif p2[0] == p1[0]:
	(p1, p2) = (p2, p1)
print('{:.7f} {:.7f} {:.7f} {:.7f}'.format(*p1, *p2))


import sys
from math import sin, cos, atan2, acos
from operator import attrgetter
from collections import namedtuple

def arg(p_vector):
	return atan2(p_vector.imag, p_vector.real)

def polar(a, r):
	return a * cos(r) + a * sin(r) * 1j

def get_circles_cross_points(c1, c2):
	centre_distance = abs(c1.centre - c2.centre)
	a = acos((pow(c1.radius, 2) + pow(centre_distance, 2) - pow(c2.radius, 2)) / (2 * c1.radius * centre_distance))
	t = arg(c2.centre - c1.centre)
	ans = [c1.centre + polar(c1.radius, t + a), c1.centre + polar(c1.radius, t - a)]
	ans.sort(key=attrgetter('real', 'imag'))
	return ans

def solve(_circles):
	(cp1, cp2) = get_circles_cross_points(*_circles)
	print('{0:.8f} {1:.8f} {2:.8f} {3:.8f}'.format(cp1.real, cp1.imag, cp2.real, cp2.imag))
	return None
_input = sys.stdin.readlines()
circle_info = map(lambda x: x.split(), _input)
Circle = namedtuple('Circle', 'centre radius')
circles = [Circle(centre=int(cx) + int(cy) * 1j, radius=int(r)) for (cx, cy, r) in circle_info]
solve(circles)


from math import sqrt
(x1, y1, r1) = map(int, input().split())
(x2, y2, r2) = map(int, input().split())

def intersection_cc(C0, r0, C1, r1):
	(x0, y0) = C0
	(x1, y1) = C1
	xd = x1 - x0
	yd = y1 - y0
	rr0 = xd ** 2 + yd ** 2
	rr1 = r0 ** 2
	rr2 = r1 ** 2
	v_cos = rr0 + rr1 - rr2
	if 4 * rr0 * rr1 < v_cos ** 2:
		return tuple()
	v_sin = sqrt(4 * rr0 * rr1 - v_cos ** 2)
	return ((x0 + (v_cos * xd - v_sin * yd) / (2.0 * rr0), y0 + (v_cos * yd + v_sin * xd) / (2.0 * rr0)), (x0 + (v_cos * xd + v_sin * yd) / (2.0 * rr0), y0 + (v_cos * yd - v_sin * xd) / (2.0 * rr0)))
(p0, p1) = sorted(intersection_cc((x1, y1), r1, (x2, y2), r2))
print('%.08f %.08f %.08f %.08f' % (p0 + p1))


(c1x, c1y, c1r) = map(int, input().split())
(c2x, c2y, c2r) = map(int, input().split())
(dx, dy) = (c2x - c1x, c2y - c1y)
s2 = dx ** 2 + dy ** 2
a = (s2 + c1r ** 2 - c2r ** 2) / 2
df = (s2 * c1r ** 2 - a ** 2) ** 0.5
(ix1, ix2) = ((a * dx + dy * df) / s2, (a * dx - dy * df) / s2)
(iy1, iy2) = ((a * dy - dx * df) / s2, (a * dy + dx * df) / s2)
if (ix1, iy1) > (ix2, iy2):
	(ix1, ix2) = (ix2, ix1)
	(iy1, iy2) = (iy2, iy1)
print(ix1 + c1x, iy1 + c1y, ix2 + c1x, iy2 + c1y)