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;

const long double eps = 1e-6;

int dcmp(long double x) {
  if (fabs(x) < eps) return 0;
  return x < 0 ? -1 : 1;
}

bool same(long double a, long double b) {
  return dcmp(a - b) == 0;
}
#define Vector P
struct P {
  long double x, y;
  P(long double x = 0, long double y = 0)
      : x(x), y(y) {}
  P operator+(P b) {
    return P(x + b.x, y + b.y);
  }
  P operator-(P b) {
    return P(x - b.x, y - b.y);
  }
  P operator*(long double b) {
    return P(x * b, y * b);
  }
  P operator/(long double b) {
    return P(x / b, y / b);
  }
  long double operator*(P b) {
    return x * b.x + y * b.y;
  }  // Dot
  long double operator^(P b) {
    return x * b.y - y * b.x;
  }  // Cross
  long double abs() { return hypot(x, y); }
  P unit() { return *this / abs(); }
  P spin(long double o) {
    long double c = cos(o), s = sin(o);
    return P(c * x - s * y, s * x + c * y);
  }
};

struct Line {
  // ax + by + c = 0
  long double a, b, c, theta;
  P pa, pb;
  Line()
      : a(0), b(0), c(0), theta(0), pa(), pb() {
  }
  Line(P pa, P pb)
      : a(pa.y - pb.y), b(pb.x - pa.x),
        c(pa ^ pb), theta(atan2(-a, b)), pa(pa),
        pb(pb) {}
  P projection(P p) {
    return pa +
      (pb - pa).unit() *
      ((pb - pa) * (p - pa) / (pb - pa).abs());
  }
  P reflection(P p) {
    return p + (projection(p) - p) * 2;
  }
  long double get_ratio(P p) {
    return (p - pa) * (pb - pa) /
      ((pb - pa).abs() * (pb - pa).abs());
  }
  P dis(P p) {
    return ((pb - pa) ^ (p - pa)) /
      (pb - pa).abs();
  }  // directed distance
};

struct Circle {
  P c;
  long double r;
  Circle(P c, long double r = 0) : c(c), r(r) {}
};
bool onsegment(P p, P a, P b) {
  return dcmp((a - p) ^ (b - p)) == 0 &&
    dcmp((a - p) * (b - p)) <= 0;
}
bool segment_intersection(P p1, P p2, P p3,
  P p4) {  // end points are not allowed
  return dcmp((p2 - p1) ^ (p3 - p1)) *
      dcmp((p2 - p1) ^ (p4 - p1)) <
    0 &&
    dcmp((p4 - p3) ^ (p1 - p3)) *
      dcmp((p4 - p3) ^ (p2 - p3)) <
    0;
}
bool parallel(Line l1, Line l2) {
  return same(l1.a * l2.b, l1.b * l2.a);
}
P line_intersection(Line l1, Line l2) {
  return P(-l1.b * l2.c + l1.c * l2.b,
           l1.a * l2.c - l1.c * l2.a) /
    (-l1.a * l2.b + l1.b * l2.a);
}
long double Area(vector<P> &p) {
  long double res = 0;
  for (int i = 1; i < (int)p.size() - 1; i++)
    res += (p[i] - p[0]) ^ (p[i + 1] - p[0]);
  return res * 0.5;
}

vector<P> Intersect(Circle a, Circle b) {
  if (a.r > b.r) swap(a, b);
  long double d = (a.c - b.c).abs();
  vector<P> ps;
  if (same(a.r + b.r, d))
    ps.push_back(
      a.c + (b.c - a.c).unit() * a.r);
  else if (a.r + b.r > d && d + a.r >= b.r) {
    long double o =
      acos((a.r * a.r + d * d - b.r * b.r) /
        (2.0 * a.r * d));
    P t = (b.c - a.c).unit();
    ps.push_back(a.c + t.spin(o) * a.r);
    ps.push_back(a.c + t.spin(-o) * a.r);
  }
  return ps;
}

long double IntersectArea(Circle a, Circle b) {
  if (a.r > b.r) swap(a, b);
  long double d = (a.c - b.c).abs();
  if (d >= a.r + b.r - eps) return 0;
  if (d + a.r <= b.r + eps)
    return a.r * a.r * acos(-1);
  long double p =
    acos((a.r * a.r + d * d - b.r * b.r) /
      (2.0 * a.r * d));
  long double q =
    acos((b.r * b.r + d * d - a.r * a.r) /
      (2.0 * b.r * d));
  return p * a.r * a.r -
    sin(p) * cos(p) * a.r * a.r +
    q * b.r * b.r - sin(q) * cos(q) * b.r * b.r;
}

int main() {
  long double x1, y1, r1, x2, y2, r2;
  while (
    cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2) {
    Circle c1(P(x1, y1), r1);
    Circle c2(P(x2, y2), r2);
    auto v = Intersect(c1, c2);
    if (v.size() == 1) v.push_back(v[0]);
    if (dcmp(v[0].x - v[1].x) == 1 ||
      (dcmp(v[0].x - v[1].x) == 0 &&
        v[0].y > v[1].y))
      swap(v[0], v[1]);
    cout << fixed << setprecision(30);
    cout << v[0].x << ' ' << v[0].y << ' '
         << v[1].x << ' ' << v[1].y << '\n';
  }
}