#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define pii pair <int, int>
#define sz(a) (int)(a.size()) 
#define resize(v) v.resize(unique(all(v)) - v.begin()); 
#define all(a) a.begin(), a.end()
#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it ++)
#define ld long double

using namespace std;

void Fast_Read_Out()
{
	ios_base::sync_with_stdio(0);
	cin.tie(), cout.tie();
}

void Random()
{
	unsigned int seed;
	asm("rdtsc" : "=A" (seed));
	srand(seed);        
}

unsigned int Time()
{
	 unsigned int time = clock() / 1000.00;
	 return time;
}

const int inf = int(1e9) + 123;
const ld eps = 0.000001;

struct Circle
{
	ld x, y, r;
	void Read()
	{
		cin >> x >> y >> r;
	}
};

ld Sqr(ld ans)
{
	return ans * ans;
}

ld Add(ld a, ld b)
{
	return a + b;
}

struct Point
{
	ld x, y;

	Point()
	{
	}

	void Read()
	{
		cin >> x >> y;
	}

	void Make_Point(ld _x, ld _y)
	{
		x = _x;
		y = _y;
	}

	Point(ld xx, ld yy)
	{
		x = xx;
		y = yy;
	}

	ld Distance(Point A)
	{
		return sqrt(Add(Sqr(A.x - x), Sqr(A.y - y)));
	}
};

struct Vector
{
	ld x, y;

	Vector()
	{
	}

	Vector(ld _x, ld _y)
	{
		x = _x;
		y = _y;
	}

	void Make_Vector(Point A, Point B)
	{
		x = B.x - A.x;
		y = B.y - A.y;
	}

	void Make_Vector(Vector A, Point B)
	{
		x = B.x - A.x;
		y = B.y - A.y;
	}

	ld Size()
	{
		return sqrt(Add(Sqr(x), Sqr(y)));
	}

	void Normalize()
	{
		ld len = Size();
		x /= len;	
		y /= len;
	}

	Vector operator+(const Vector& p) 
	{
		return Vector(x + p.x, y + p.y);
	}

	Vector operator+(const Point& p) 
	{
		return Vector(x + p.x, y + p.y);
	}

	Vector operator-(const Vector& p) 
	{
		return Vector(x - p.x, y - p.y);
	}

	Vector operator*(const double& d) 
	{
		return Vector(x * d, y * d);
	}

	Vector operator/(const double& d) 
	{
		return Vector(x / d, y / d);
	}

	void Print()
	{
		cout << fixed << setprecision(6) << x << ' ' << y << endl;
	}
};

struct Line
{
	ld a, b, c;

	void Make_Line(Point A, Point B)
	{
		a = B.y - A.y;
		b = -(B.x - A.x);
		c = A.y * (B.x - A.x) - A.x * (B.y - A.y);
	}

	ld Distance_Point_Line(Point M)
	{
		ld ans = abs(a * M.x + b * M.y + c);
		ld res = sqrt(a * a + b * b);
		return ans / res;
	}

	void Make_Perpendicular(Vector M, Line L)
	{
		a = L.b;
		b = -L.a;
		c = -L.b * M.x + L.a * M.y;
	}
};

bool Less(ld l, ld r)
{
	return l + eps < r;
}

bool More(ld l, ld r)
{
	swap(l, r);
	return Less(l, r);
}

bool Equal(ld l, ld r)
{
	return abs(l - r) < eps;
}

int main ()
{
	#ifdef JUDGE
		freopen("input.txt", "r", stdin);
	#endif 
	Random();
	Fast_Read_Out();
	Circle A, B;
	Point O1, O2;
	Vector V, Ans, Res, K, N;
	A.Read();
	B.Read();
	O1.Make_Point(A.x, A.y);
	O2.Make_Point(B.x, B.y);
	ld d = O1.Distance(O2);
	ld x = Sqr(A.r) - Sqr(B.r) + Sqr(d);
	x /= 2 * d;
	V.Make_Vector(O1, O2); 
	V.Normalize();
	Ans.x = 0, Ans.y = 0;
	Res.x = 0, Res.y = 0;
	V = V * x;
	V = V + O1; 
	K.Make_Vector(V, O1);
	ld y = sqrt(Sqr(A.r) - Sqr(x));
	Ans.x = -K.y, Ans.y = K.x;
	Res.x = K.y, Res.y = -K.x;
	Ans.Normalize();
	Res.Normalize();
	Ans = Ans * y;
	Res = Res * y;
	Ans = Ans + V;
	Res = Res + V;
	/*if(B.r > A.r) swap(A.r, B.r);
	if(More(d, A.r + B.r)) cout << 0 << endl;
	if(A.r == B.r && A.x == B.x && A.y == B.y) cout << 3 << endl;
	else if(Equal(d, A.r + B.r))
	{
		cout << 1 << endl;
		Res.Print();                                                                                                                               	
	}
	else if(More(A.r + B.r, d) && More(d, A.r - B.r)) 
	{
		cout << 2 << endl;
		Res.Print();
		Ans.Print();
	}
	else if(Equal(d, A.r - B.r))
	{
		cout << 1 << endl;                                          
		Ans.Print();
	}
	else if(Less(d, A.r - B.r)) cout << 0 << endl;
	else return 0;   
	*/
	if(Less(Res.x, Ans.x)) Res.Print(), Ans.Print();
	else if(Equal(Res.x, Ans.x) && Less(Res.y, Ans.y)) Res.Print(), Ans.Print();
	else if(More(Res.x, Ans.x)) Ans.Print(), Res.Print();
	else if(Equal(Res.x, Ans.x) && More(Res.y, Ans.y)) Ans.Print(), Res.Print();
	else Ans.Print(), Res.Print();
	#ifdef JUDGE
//		cout << Time() << endl;
	#endif
}
// Easy Peasy Lemon Squeezy


Measured memory_bytes: 3276