#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;
}


Measured memory_bytes: 3256