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 <cstdio>
#include <cmath>
#include <utility>

using namespace std;

#define EPS (1e-10)
#define equals( A, B ) (fabs((A) - (B)) < EPS)

class Point {
public:
    double x, y;
    Point( double x = 0, double y = 0 ): x(x), y(y) {}
    
    Point operator + ( Point p ) { return Point( x + p.x, y + p.y ); }
    Point operator - ( Point p ) { return Point( x - p.x, y - p.y ); }
    Point operator * ( double a ) { return Point( a * x, a * y ); }
    Point operator / ( double a ) { return Point( x / a, y / a ); }

    double abs() { return sqrt( norm() ); }
    double norm() { return x * x + y * y; }

    bool operator < ( const Point &p ) const {
	return ( x != p.x ) ? x < p.x : y < p.y;
    }

    bool operator == ( const Point &p ) const {
	return equals( x, p.x ) && equals( y, p.y ); 
    }

    double dot( Point a ) { return x * a.x + y * a.y; }
    double cross( Point a ) { return x * a.y - y * a.x; }
    double distance( Point a ) {
	return (*this - a).abs();
    }
    double arg() {
	return atan2( y, x );
    }
};

typedef Point Vector;

static const int COUNTER_CLOCKWISE = 1;
static const int CLOCKWISE = -1;
static const int ONLINE_BACK = 2;
static const int ONLINE_FRONT = -2;
static const int ON_SEGMENT = 0;

class Line {
public:
    Point p1, p2;
    Line( Point p1 = Point(), Point p2 = Point() ): p1(p1), p2(p2){}
    // ?????´????????????( cos = 0 )
    bool isOrthogonal( Line a ) {
	return equals( 0.0, (p1 - p2).dot( a.p1 - a.p2 ) );
    }
    // ??????????????????( sin = 0 )
    bool isParallel( Line a ) {
	return equals( 0.0, (p1 - p2).cross( a.p1 - a.p2 ) );
    }

    Point projection( Point p ) {
	Vector v12 = p2 - p1;
	double r = v12.dot( p - p1 ) / v12.norm();
	return p1 + v12 * r;
    }

    Point reflection( Point p ) {
	return p + ( projection( p ) - p ) * 2.0;
    }

    double distance( Point p ) {
	Vector v12 = this->p2 -this->p1;
	Vector v10 = p - this->p1;
	
	return abs( v12.cross( v10 ) / v12.abs() );
    }

    double distanceSP( Point p ) {
	if ( (p - this->p1).dot( this->p2 - this->p1 ) < 0.0 ) {
	    return this->p1.distance( p );
	} else if ( (p - this->p2).dot( this->p1 - this->p2 ) < 0.0 ) {
	    return this->p2.distance( p );
	}
	else {
	    return distance( p );
	}
    }

    int ccw( Point p ) {
	Vector a = p2 - p1;
	Vector b = p - p1;
	if ( a.cross( b ) > EPS ) return COUNTER_CLOCKWISE;
	else if ( a.cross( b ) < -EPS ) return CLOCKWISE;
	else if ( a.dot( b ) < -EPS ) return ONLINE_BACK;
	else if ( a.norm() < b.norm() ) return ONLINE_FRONT;
	else return ON_SEGMENT;
    }

    bool intersect( Line l ) {
	return ( ( ccw( l.p1 ) * ccw( l.p2 ) <= 0 && l.ccw( p1 ) * l.ccw( p2 ) <= 0 ) );
    }

    Point crossPoint( Line l ) {
	Vector base = p2 - p1;
	Vector v1 = l.p1 - p1;
	Vector v2 = l.p2 - p1;
	double d1 = base.cross( v1 );
	double d2 = base.cross( v2 );	
	double t = d1 / ( d1 + d2 );

	return l.p1 + ( l.p2 - l.p1 ) * t;
    }
};

typedef Line Segment;

// ?\???¢???
Vector polar( double mag, double arg ) {
    return Vector( mag * cos( arg ), mag * sin( arg ) );
}

class Circle {
public:
    Point center;
    double r;

    Circle( Point center = Point(), double r = 0 ): center(center), r(r) {}

    pair<Point, Point> crossPoints( Line l ) {
	Point proj = l.projection( center ); // ?????????????????´???????°???±
	double base = sqrt( r * r - ( center - proj ).norm() );
	Vector e = ( l.p2 - l.p1 ) / ( l.p2 - l.p1 ).abs();
	if ( l.p2 < l.p1 ) e = e * -1; // x?????£????????????????????????
	return make_pair( proj - e * base, proj + e * base );
    }

    pair<Point, Point> crossPoints( Circle c ) {
	double d = ( c.center - center ).abs();
	double cos_alpha = ( r * r + d * d - c.r * c.r ) / ( 2.0 * r * d );
	double alpha = acos( cos_alpha );
	double t = ( c.center - center ).arg();
	Point p1 = center + polar( r, t - alpha );
	Point p2 = center + polar( r, t + alpha );
	
	return ( p1 < p2 ) ? make_pair( p1, p2 ) : make_pair( p2, p1 );
    }
};


int main()
{
    Circle c1, c2;
    scanf("%lf %lf %lf", &c1.center.x, &c1.center.y, &c1.r);
    scanf("%lf %lf %lf", &c2.center.x, &c2.center.y, &c2.r);

    pair<Point, Point> pp = c1.crossPoints( c2 );

    printf("%lf %lf ", pp.first.x, pp.first.y);
    printf("%lf %lf\n", pp.second.x, pp.second.y);

    return 0;
}