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 rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = b - 1; i >= (int)(a); --i)

using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vd = vector<double>;
using vvi = vector<vi>;

constexpr int MOD = 1000000007;

// Data structures.
struct Point {
    double x, y;
    Point(double x = 0, double y = 0) : x(x), y(y) {}
    Point(const Point& p) : x(p.x), y(p.y) {}

    Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
    Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
    Point operator*(double k) const { return Point(k * x, k * y); }
    Point operator/(double k) const { return Point(x / k, y / k); }

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

    static double norm(const Point& p) { return sqrt(p.x * p.x + p.y * p.y); }
    static double dot(const Point& p1, const Point& p2) { return p1.x * p2.x + p1.y * p2.y; }
    static double cross(const Point& p1, const Point& p2) { return p1.x * p2.y - p1.y * p2.x; }
};
typedef Point Vector;

struct Segment {
    Point s, t;
};
typedef Segment Line;

class Circle {
public:
    Point c;
    double r;
    Circle(double cx = 0.0, double cy = 0.0, double r = 0.0) : c(cx, cy), r(r) {}
    Circle(Point c = Point(), double r = 0.0) : c(c), r(r) {}
};

vector<Point> cross_point(const Circle& c1, const Circle& c2) {
    vector<Point> ans;

    double d = Point::norm(c2.c - c1.c);
    Point vec((c2.c - c1.c) / d);

    double x = (d * d + c1.r * c1.r - c2.r * c2.r) / (2 * d);
    Point mid = (c1.c * (d - x) + c2.c * x) / d;

    Point normal = Point(-vec.y, vec.x) * sqrt(c1.r * c1.r - x * x);
    ans.push_back(mid - normal);
    ans.push_back(mid + normal);

    return ans;
}

vector<Point> cross_point2(const Circle& c1, const Circle& c2) {
    vector<Point> ans;

    double d = Point::norm(c2.c - c1.c);
    Point vec(c2.c - c1.c);

    double alpha = acos(c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d);
    double t = atan(vec.y / vec.x);

    double cos1 = cos(alpha + t);
    double sin1 = sin(alpha + t);
    ans.push_back(c1.c + Point(cos1, sin1) * d);

    double cos2 = cos(-alpha + t);
    double sin2 = sin(-alpha + t);
    ans.push_back(c1.c + Point(cos2, sin2) * d);

    return ans;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    double cx, cy, r;

    cin >> cx >> cy >> r;
    Circle c1(cx, cy, r);

    cin >> cx >> cy >> r;
    Circle c2(cx, cy, r);

    vector<Point> ps = cross_point(c1, c2);
    sort(ps.begin(), ps.end());
    printf("%.10f %.10f %.10f %.10f\n", ps[0].x, ps[0].y, ps[1].x, ps[1].y);

    return 0;
}