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>
using namespace std;
#define double long double
const double EPS = 1e-9;   // 許容誤差。問題によって変える
typedef complex<double> P; // Point
//点の座標は複素数で持つ
#define X real()
#define Y imag()

namespace std{
bool operator<(const P p1, const P p2)
{
    return p1.X != p2.X ? p1.X < p2.X : p1.Y < p2.Y;
}
P operator+(const P p1, const P p2) { return P(p1.X + p2.X, p1.Y + p2.Y); }
P operator-(const P p1, const P p2) { return P(p1.X - p2.X, p1.Y - p2.Y); }
P operator*(const P p, double k) { return P(p.X * k, p.Y * k); }
P operator/(const P p, double k) { return P(p.X / k, p.Y / k); }
} // namespace std
//ここまで写経必須

//Segment/L
struct Segment{
    P p1, p2;
    Segment() {}
    Segment(P p1, P p2) : p1(p1), p2(p2) {}
};
typedef Segment L;

//Circle
struct Circle{
    P p;
    double r;
    Circle(const P &p, double r) : p(p), r(r) {}
};
typedef Circle C;

typedef vector<P> G;
//ノルム
//二点a,bを投げるとノルム(a1-b1)^2+(a2-b2)^2を返す
double norm(P &p1, P &p2){
    return (p1.X - p2.X) * (p1.X - p2.X) + (p1.Y - p2.Y) * (p1.Y - p2.Y);
}

//外積cross(a,b) = |a||b|sinθ=a1b2-a2b1
//二点a,bを投げると外積を返す
double cross(const P &a, const P &b){
    return (conj(a) * b).Y;
}

//内積dot(a,b) = |a||b|cosθ=a1b1+a2b2
//二点a,bを投げると内積を返す
double dot(const P &a, const P &b){
    return (conj(a) * b).X;
}

//射影
//L(又はS)と点Pを投げるとLへPを射影した座標を返す
//依存:dot,norm
P Projection(L l, P p){
    P base = l.p2 - l.p1;                        //始点
    double r = dot(p - l.p1, base) / norm(base); //線分に対する倍率の計算
    return l.p1 + base * r;
}

bool intersectLP(const L &l, const P &p)
{
    return abs(cross(l.p2 - p, l.p1 - p)) < EPS;
}
//distance
//L,S,Pについてペアを投げるとその距離を計算
//引数の順番は関数名参照

//依存:Projection,dot,norm
double distanceLP(const L &l, const P &p)
{
    return abs(p - Projection(l, p));
}


//円と直線の交点
//円と直線を投げるとその交点二つを返す
//依存:Projection,diatanceLP
vector<P> crosspointCL(const C &c, const L &l)
{
    vector<P> res;
    double d = distanceLP(l, c.p); // 中心と直線の距離
    if (abs(d - c.r) < EPS)
    { // 触れている
        res.push_back(Projection(l, c.p));
        return res;
    }
    if (d > c.r)
        return res; // 離れている
    P h = Projection(l, c.p);
    P u = sqrt(c.r * c.r - d * d) * (l.p2 - l.p1) / abs(l.p2 - l.p1);
    res.push_back(h + u);
    res.push_back(h - u);
    return res;
}

//円と円の交差判定
//円を二つ投げると値を返します
//離れている:0 外接:-2 c1＞c2内接:-1 c2>c1内接:1 c1inc2:3 c2inc1:-3 交点二つ:2
int intersectCC(const C &c1, const C &c2){
    double d = abs(c1.p - c2.p), r1 = c1.r, r2 = c2.r;
    if (r1 + r2 < d)
        return 0; // 離れている
    if (abs(r1 + r2 - d) < EPS)
        return -2; // 外接
    if (abs(d + r1 - r2) < EPS)
        return +1; // c1 が c2 の中で内接
    if (abs(d + r2 - r1) < EPS)
        return -1; // c2 が c1 の中で内接
    if (d + r1 < r2)
        return +3; // c1 が c2 の中
    if (d + r2 < r1)
        return -3; // c2 が c1 の中
    return 2; // 2つの交点を持つ
}

//円と円の交点
//円を二つ投げると交点が入ったvectorを返す
//交点なしor一致の場合空で返す
vector<P> crosspointCC(const C &c1, const C &c2){
    //cout << "114514" << endl;
    vector<P> res;
    double r1 = c1.r, r2 = c2.r, d = abs(c1.p - c2.p);
    if (d<EPS)
        return res; // 中心が同じ
    int i = intersectCC(c1, c2);
    if (i == +1 || i == -1)
    { // 内接
        //cout << "22" << endl;
        if (r2 < r1)
            res.push_back(c1.p + r1 / d * (c2.p - c1.p));
        else
            res.push_back(c2.p + r2 / d * (c1.p - c2.p));
        return res;
    }else if (i == -2){ // 外接
        //cout << "44" << endl;
        res.push_back((c1.p * c2.r + c2.p * c1.r) / (c1.r + c2.r));
        return res;
    }else if (i == 0 || i == +3 || i == -3){ // 共通部分なし || 内部
        return res;
    }
    // 2つの交点を持つ
    P p = c1.p - c2.p;
    double A = -2 * p.real(), B = -2 * p.imag();
    double C = norm(c1.p)-norm(c2.p) - r1 * r1 + r2 * r2;
    L l;
    if (abs(A) < EPS)
    {
        l = L(P(0, -C / B), P(1, -C / B));
    }
    else if (abs(B) < EPS)
    {
        l = L(P(-C / A, 0), P(-C / A, 1));
    }
    else if(abs(C)<EPS){
        l = L(P(0, 0), P(1, -A / B));
    }else{
        l = L(P(0, -C / B), P(-C / A, 0));
    }
    return crosspointCL(c1,l); // Ax + By + C = 0
}
int main(){
    double x1,y1,r1,x2,y2,r2;
    cin>>x1>>y1>>r1>>x2>>y2>>r2;
    C c1 = C(P(x1, y1), r1), c2 = C(P(x2, y2), r2);
    //vector<P> ans = crosspointCC(c1, c2);
    // cout << c2.r << endl;
    vector<P> ans = crosspointCC(c1, c2);
    //cout << ans.size() << endl;
          if (ans.size() == 2)
        {
            if (ans[0] < ans[1])
            {
                printf("%.16Lf %.16Lf %.16Lf %.16Lf\n", ans[0].X, ans[0].Y, ans[1].X, ans[1].Y);
            }
            else
            {
                printf("%.16Lf %.16Lf %.16Lf %.16Lf\n", ans[1].X, ans[1].Y, ans[0].X, ans[0].Y);
            }
        }
        else
        {
            printf("%.16Lf %.16Lf %.16Lf %.16Lf\n", ans[0].X, ans[0].Y, ans[0].X, ans[0].Y);
        }
    return 0;
}