Problem: 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

Solution (in CPP):

Solution:
#include <bits/stdc++.h>

#define rep(i, a, b) for (int i = a, i##end = b; i <= i##end; ++i)
#define per(i, a, b) for (int i = a, i##end = b; i >= i##end; --i)
#define rep0(i, a) for (int i = 0, i##end = a; i < i##end; ++i)
#define per0(i, a) for (int i = (int)a-1; ~i; --i)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define chkmax(a, b) a = max(a, b)
#define chkmin(a, b) a = min(a, b)
#define x first
#define y second
#define enter putchar('\n')

typedef long long ll;
typedef double DB;

const DB eps = 1e-12;
const DB PI = acos(-1);

int sgn(DB x) { return fabs(x) < eps ? 0 : (x > 0 ? 1 : -1); }

struct Point {
	DB x, y;
	Point(DB x = 0, DB y = 0) : x(x), y(y) {}
	Point operator + (Point a) { return Point(x + a.x, y + a.y); }
	Point operator - (Point a) { return Point(x - a.x, y - a.y); }
	Point operator - () { return Point(-x, -y); }
	friend Point operator * (DB k, Point a) { return Point(k * a.x, k * a.y); }
	Point operator / (DB k) { return Point(x / k, y / k); }
	DB operator % (Point a) { return x * a.x + y * a.y; }
	DB operator / (Point a) { return x * a.y - y * a.x; }
	operator DB() { return sqrt(x*x + y*y); }
	bool operator < (const Point &a) const { int d1 = sgn(x-a.x), d2 = sgn(y-a.y); return d1 < 0 || (d1 == 0 && d2 < 0); }
};

struct Circle { Point O; DB r; };

Point Proj(Point P, Point P1, Point P2) {
	Point v = P2-P1; DB t = (P-P1)%v / (v%v);
	return P1 + t*v;
}

Point GetLineInter(Point P1, Point P2, Point Q1, Point Q2) {
	Point v = P2-P1, w = Q2-Q1; DB t = (Q1-P1)/w / (v/w);
	return P1 + t*v;
}

int Direct1(Point P, Point P1, Point P2) { return sgn((P1-P)%(P2-P)); }
int Direct2(Point P, Point P1, Point P2) { return sgn((P1-P)/(P2-P)); }

int q;

Circle GetInnerCir(Point A, Point B, Point C) {
	Point v1 = B-A, v2 = C-A, v3 = C-B;
	v1 = v1/DB(v1), v2 = v2/DB(v2), v3 = v3/DB(v3);
	Point P = GetLineInter(A, A + (v1+v2), B, B + (v3-v1));
	return (Circle){P, DB(P-Proj(P, A, B))};
}

Circle GetOuterCir(Point A, Point B, Point C) {
	Point M = 0.5*(A+B), N = 0.5*(A+C), v = B-A, w = C-A;
	Point P = GetLineInter(M, M + Point(v.y, -v.x), N, N + Point(w.y, -w.x));
	return (Circle){P, DB(P-A)};
}

std::pair<Point, Point> GetCirLineInter(Circle C, Point P1, Point P2) {
	Point P = Proj(C.O, P1, P2), v = P2-P1; v = v/DB(v);
	DB d = DB(C.O-P);
	if (!sgn(d-C.r)) return std::make_pair(P, P);
	DB t = sqrt(C.r*C.r - d*d);
	return std::make_pair(P+t*v, P-t*v);
}

std::pair<Point, Point> GetCirInter(Circle C1, Circle C2) {
	Point A = C1.O, B = C2.O, v = B-A; DB a = DB(v), x = (a*a+C1.r*C1.r-C2.r*C2.r)/(2*a); v = v/a;
	Point P = A+x*v;
	if (!sgn(C1.r-x)) return std::make_pair(P, P);
	DB h = sqrt(C1.r*C1.r - x*x); Point w = Point(v.y, -v.x);
	return std::make_pair(P+h*w, P-h*w);
}

int main() {
	Circle C1, C2;
	scanf("%lf%lf%lf", &C1.O.x, &C1.O.y, &C1.r);
	scanf("%lf%lf%lf", &C2.O.x, &C2.O.y, &C2.r);
	std::pair<Point, Point> X = GetCirInter(C1, C2);
	if (X.y < X.x) std::swap(X.x, X.y);
	printf("%.10lf %.10lf %.10lf %.10lf\n", X.x.x, X.x.y, X.y.x, X.y.y);
	/*
	Circle C;
	scanf("%lf%lf%lf", &C.O.x, &C.O.y, &C.r);
	scanf("%d", &q);
	while (q--) {
		Point P1, P2;
		scanf("%lf%lf%lf%lf", &P1.x, &P1.y, &P2.x, &P2.y);
		std::pair<Point, Point> X = GetCirLineInter(C, P1, P2);
		if (X.y < X.x) std::swap(X.x, X.y);
		printf("%.10lf %.10lf %.10lf %.10lf\n", X.x.x, X.x.y, X.y.x, X.y.y);
	}
	*/
	return 0;
}