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