#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <math.h>
#include <algorithm>
const double EPS = 1e-9;
using namespace std;
class point {
public:
	double x, y;
	point(double a, double b) {
		x = a; y = b;
	}
	point operator - (point v) {
		return point(x - v.x, y - v.y);
	}
	point operator + (point v) {
		return point(x + v.x, y + v.y);
	}
};
class vector {
public:
	double x, y;
	vector(double a, double  b) {
		x = a;
		y = b;
	};
	vector operator * (const vector &v)const {
		return vector(x*v.x, y* v.y);
	}
	vector operator * (double a) {
		return vector(x * a, y * a);
	}
	vector operator - (vector v) {
		return vector(x - v.x, y - v.y);
	}
	vector operator + (vector v) {
		return vector(x + v.x, y + v.y);
	}
};
class circle {
public:
	point p;
	double r;
	circle(point a, double b) : p(a), r(b) {};

};
inline double dot(vector v1, vector v2) {
	return v1.x*v2.x + v1.y*v2.y;
}
inline double squ(vector v) {
	return v.x*v.x + v.y*v.y;
}
inline double norm(vector v) {
	return sqrt(squ(v));
}
inline void printv(vector v) {
	printf("%.10f %.10f\n", v.x, v.y);
}
inline void printpp(pair<point, point> p) {
	printf("%.7f %.7f %.7f %.7f", p.first.x, p.first.y, p.second.x, p.second.y);
}
inline void printc(vector v1, vector v2) {
	printf("%.10f %.10f %.10f %.10f\n", v1.x, v1.y, v2.x, v2.y);
}
inline vector pro(vector base, vector v, vector be) {
	double a = dot(base, v) / squ(base);
	vector v1 = base * a;
	return v1 + be;
}
inline vector ref(vector v, vector be) {
	return (v - be)*2 + be;
}
inline double cross(vector v1, vector v2) {
	return v1.x*v2.y - v1.y*v2.x;
}
inline int ccw(vector v1, vector v2, vector v3) {
	vector a = v2 - v1;
	vector b = v3 - v1;
	if (cross(a, b) < 0.0) return -1;
	else if (cross(a, b) > 0.0) return 1;
	else if (dot(a, b) < 0.0) return -2;
	else if (dot(a, b) > squ(a)) return 2;
	else return 0;
}
inline int inter(vector v1, vector v2, vector v3, vector v4) {
	return (ccw(v1, v2, v3) * ccw(v1, v2, v4) <= 0) && (ccw(v3, v4, v1) * ccw(v3, v4, v2) <= 0);
}
inline double disPP(vector v1, vector v2) {
	return norm(v2 - v1);
}
inline double disLP(vector v1, vector v2, vector v3) {
	vector a = v2 - v1;
	vector b = v3 - v1;
	return fabs(cross(a, b) / norm(a));
}
inline double disSP(vector v1, vector v2, vector v3) {
	vector a = v2 - v1;
	vector b = v3 - v1;
	vector c = v1 - v2;
	vector d = v3 - v2;
	if (dot(a, b) < 0.0) return disPP(v1, v3);
	else if (dot(c, d) < 0.0) return disPP(v2, v3);
	else return disLP(v1, v2, v3);
}
inline double disSS(vector v1, vector v2, vector v3, vector v4) {
	if (inter(v1, v2, v3, v4)) return 0;
	double a = disSP(v1, v2, v3);
	double b = disSP(v1, v2, v4);
	double c = disSP(v3, v4, v1);
	double d = disSP(v3, v4, v2);
	return min(min(a, b), min(c, d));
}
inline vector getcross(vector v1, vector v2, vector v3, vector v4) {
	vector v5 = pro(v2 - v1, v3 - v1, v1);
	vector v6 = pro(v2 - v1, v4 - v1, v1);
	double a = disPP(v3, v5);
	double b = disPP(v4, v6);
	vector vans = (v6 - v5)*a*(1 / (a + b)) + v5;
	return vans;

}
inline pair<vector, vector> getccl(double r, vector o, vector v1, vector v2) {
	vector ev = (v2 - v1)*(1 / norm(v2 - v1));
	vector pr = pro(v2 - v1, o - v1, v1);
	double l = sqrt(r *r - squ(o - pr));
	vector ans1 = ev * l + pr;
	vector ans2 = pr - ev * l;
	if (ans1.x > ans2.x) swap(ans1, ans2);
	else if (ans1.x == ans2.x)
		if (ans1.y > ans2.y) swap(ans1, ans2);
	return make_pair(ans1, ans2);
}
inline pair<point, point> getccc(circle c1, circle c2) {
	vector v1(c2.p.x - c1.p.x, c2.p.y - c1.p.y);
	double dis = norm(v1);
	double a = acos((dis*dis + c1.r*c1.r - c2.r*c2.r) / (2 * c1.r*dis));
	double b = atan2(c2.p.y - c1.p.y, c2.p.x - c1.p.x);
	point pa(c1.r*cos(a + b), c1.r*sin(a + b));
	point pb(c1.r*cos(b - a), c1.r*sin(b -a));
	point ans1(c1.p + pa);
	point ans2(c1.p + pb);
	if (ans1.x > ans2.x || ((ans1.x == ans2.x) && (ans1.y > ans2.y))) swap(ans1, ans2);
	return make_pair(ans1, ans2);
}
int main() {
	int c1x, c1y, r1,  c2x, c2y, r2;
	cin >>c1x >> c1y >> r1 >>  c2x >> c2y >> r2;
	point p1(c1x, c1y);
	point p2(c2x, c2y);
	circle c1(p1, r1);
	circle c2(p2, r2);
	printpp(getccc(c1, c2));
	return 0;
}

Measured memory_bytes: 3632