Problem: The Olympic Games in Bercouver are in full swing now. Here everyone has their own objectives: sportsmen compete for medals, and sport commentators compete for more convenient positions to give a running commentary. Today the main sport events take place at three round stadiums, and the commentator's objective is to choose the best point of observation, that is to say the point from where all the three stadiums can be observed. As all the sport competitions are of the same importance, the stadiums should be observed at the same angle. If the number of points meeting the conditions is more than one, the point with the maximum angle of observation is prefered. 

Would you, please, help the famous Berland commentator G. Berniev to find the best point of observation. It should be noted, that the stadiums do not hide each other, the commentator can easily see one stadium through the other.

Input

The input data consists of three lines, each of them describes the position of one stadium. The lines have the format x, y, r, where (x, y) are the coordinates of the stadium's center ( - 103 ≤ x, y ≤ 103), and r (1 ≤ r ≤ 103) is its radius. All the numbers in the input data are integer, stadiums do not have common points, and their centers are not on the same line. 

Output

Print the coordinates of the required point with five digits after the decimal point. If there is no answer meeting the conditions, the program shouldn't print anything. The output data should be left blank.

Examples

Input

0 0 10
60 0 10
30 30 10


Output

30.00000 0.00000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
struct Circle {
  double a, b;
  double r;
  bool operator<(const Circle &o) const { return r < o.r; }
} c[3];
void init() {
  for (int i = 0; i < 3; ++i) scanf("%lf%lf%lf", &c[i].a, &c[i].b, &c[i].r);
  sort(c, c + 3);
}
inline void TwoPoint2Line(double a1, double b1, double a2, double b2, double &a,
                          double &b, double &c) {
  a = b1 - b2;
  b = a2 - a1;
  c = a1 * b2 - b1 * a2;
}
inline void MiddlePointErectLine(double a1, double b1, double a2, double b2,
                                 double &a, double &b, double &c) {
  a = a1 - a2;
  b = b1 - b2;
  c = -(a1 * a1 - a2 * a2 + b1 * b1 - b2 * b2) / 2;
}
inline void TwoLine2Point(double a1, double b1, double c1, double a2, double b2,
                          double c2, double &a, double &b) {
  double c = a1 * b2 - b1 * a2;
  a = (b1 * c2 - c1 * b2) / c;
  b = (c1 * a2 - a1 * c2) / c;
}
inline void TwoCircle2Circle(Circle &o1, Circle &o2, Circle &o) {
  double r1 = o1.r * o1.r, r2 = o2.r * o2.r;
  double a = r1 - r2;
  double b = -2 * (r1 * o2.a - r2 * o1.a) / a;
  double c = -2 * (r1 * o2.b - r2 * o1.b) / a;
  double d =
      (r1 * (o2.a * o2.a + o2.b * o2.b) - r2 * (o1.a * o1.a + o1.b * o1.b)) / a;
  d -= b * b / 4;
  d -= c * c / 4;
  o.a = -b / 2;
  o.b = -c / 2;
  o.r = sqrt(-d);
}
inline double DistancePoint2Line(double x, double y, double a, double b,
                                 double c) {
  return fabs(a * x + b * y + c) / sqrt(a * a + b * b);
}
inline void LineTangentCircle(double a1, double b1, double c1, Circle &o,
                              double &x, double &y) {
  double a2 = a1 * a1, b2 = b1 * b1;
  x = (b2 * o.a - a1 * (c1 + b1 * o.b)) / (a2 + b2);
  y = -(b1 * (c1 + a1 * o.a) - a2 * o.b) / (a2 + b2);
}
inline void CircleTangentCircle(Circle &o1, Circle &o2, double &x, double &y) {
  x = o1.r * (o2.a - o1.a) / (o1.r + o2.r) + o1.a;
  y = o1.r * (o2.b - o1.b) / (o1.r + o2.r) + o1.b;
}
inline void LineCrossCircle(double a1, double b1, double c1, Circle &o,
                            double &u1, double &v1, double &u2, double &v2) {
  double a2 = a1 * a1, b2 = b1 * b1, c2 = c1 * c1, r2 = o.r * o.r;
  double delta = a2 * (r2 - o.a * o.a) - 2 * a1 * c1 * o.a +
                 b2 * (r2 - o.b * o.b) - 2 * b1 * c1 * o.b - c2 -
                 2 * a1 * b1 * o.a * o.b;
  u1 = (b2 * o.a - a1 * (c1 + b1 * o.b) + b1 * sqrt(delta)) / (a2 + b2);
  v1 = -(b1 * (c1 + a1 * o.a) - a2 * o.b + a1 * sqrt(delta)) / (a2 + b2);
  u2 = (b2 * o.a - a1 * (c1 + b1 * o.b) - b1 * sqrt(delta)) / (a2 + b2);
  v2 = -(b1 * (c1 + a1 * o.a) - a2 * o.b - a1 * sqrt(delta)) / (a2 + b2);
}
inline double distance2(double a1, double b1, double a2, double b2) {
  return (a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2);
}
inline double distance(double a1, double b1, double a2, double b2) {
  return sqrt((a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));
}
inline void CircleCrossCircle(Circle &o1, Circle &o2, double &u1, double &v1,
                              double &u2, double &v2) {
  double dist2 = distance2(o1.a, o1.b, o2.a, o2.b);
  double r12 = o1.r * o1.r, r22 = o2.r * o2.r, a12 = o1.a * o1.a,
         a22 = o2.a * o2.a, b12 = o1.b * o1.b, b22 = o2.b * o2.b;
  double n1 = sqrt((-(o1.r - o2.r) * (o1.r - o2.r) + dist2) *
                   ((o1.r + o2.r) * (o1.r + o2.r) - dist2));
  double n2 = 2 * dist2;
  double n3 = -r12 * o1.a + r12 * o2.a + r22 * o1.a - r22 * o2.a - o1.a * a22 -
              a12 * o2.a + o1.a * b12 + o1.a * b22 + o2.a * b12 + o2.a * b22 +
              a12 * o1.a + a22 * o2.a - 2 * o1.a * o1.b * o2.b -
              2 * o2.a * o1.b * o2.b;
  u1 = ((o1.b - o2.b) * n1 + n3) / n2;
  u2 = ((o2.b - o1.b) * n1 + n3) / n2;
  double n4 = a12 * (o1.b + o2.b) - 2 * o1.a * o2.a * (o1.b + o2.b) +
              (r22 - r12) * (o1.b - o2.b) + a22 * (o1.b + o2.b) + b12 * o1.b -
              b12 * o2.b - o1.b * b22 + b22 * o2.b;
  v1 = ((o2.a - o1.a) * n1 + n4) / n2;
  v2 = ((o1.a - o2.a) * n1 + n4) / n2;
  double temp1 = distance(o1.a, o1.b, u1, v1);
  double temp2 = distance(o1.a, o1.b, u2, v2);
  double temp3 = distance(o2.a, o2.b, u1, v1);
  double temp4 = distance(o2.a, o2.b, u2, v2);
}
inline double IntercrossCircle(double x, double y, Circle &o) {
  double a2 = o.a * o.a, b2 = o.b * o.b, r2 = o.r * o.r;
  return -(4 * r2 * r2) /
             (a2 - 2 * o.a * x + b2 - 2 * o.b * y + x * x + y * y) +
         4 * r2;
}
void Case1(double &x, double &y) {
  double a1, b1, c1, a2, b2, c2;
  MiddlePointErectLine(c[0].a, c[0].b, c[1].a, c[1].b, a1, b1, c1);
  MiddlePointErectLine(c[1].a, c[1].b, c[2].a, c[2].b, a2, b2, c2);
  TwoLine2Point(a1, b1, c1, a2, b2, c2, x, y);
}
int Case2(double &u1, double &v1, double &u2, double &v2, double type) {
  double a1, b1, c1;
  Circle o;
  if (type == 1) {
    MiddlePointErectLine(c[0].a, c[0].b, c[1].a, c[1].b, a1, b1, c1);
    TwoCircle2Circle(c[1], c[2], o);
  } else {
    MiddlePointErectLine(c[1].a, c[1].b, c[2].a, c[2].b, a1, b1, c1);
    TwoCircle2Circle(c[0], c[1], o);
  }
  double dis = DistancePoint2Line(o.a, o.b, a1, b1, c1);
  if (dis - o.r > eps) return -1;
  if (fabs(dis - o.r) <= eps) {
    LineTangentCircle(a1, b1, c1, o, u1, v1);
    return 0;
  }
  LineCrossCircle(a1, b1, c1, o, u1, v1, u2, v2);
  return 1;
}
int Case3(double &u1, double &v1, double &u2, double &v2) {
  Circle o1, o2;
  TwoCircle2Circle(c[0], c[1], o1);
  TwoCircle2Circle(c[1], c[2], o2);
  double dist = distance(o1.a, o1.b, o2.a, o2.b);
  if (dist - o1.r - o2.r > eps) return -1;
  if (fabs(dist - o1.r - o2.r) <= eps) {
    CircleTangentCircle(o1, o2, u1, v1);
    return 0;
  }
  CircleCrossCircle(o1, o2, u1, v1, u2, v2);
  return 1;
}
int main() {
  init();
  double delta1 = fabs(c[0].r - c[1].r), delta2 = fabs(c[1].r - c[2].r);
  if (delta1 < eps && delta2 < eps) {
    double x, y;
    Case1(x, y);
    printf("%lf %lf\n", x, y);
  } else if (delta1 < eps) {
    double u1, v1, u2, v2;
    int ret = Case2(u1, v1, u2, v2, 1);
    if (ret == -1) return 0;
    if (ret == 1 &&
        IntercrossCircle(u1, v1, c[0]) > IntercrossCircle(u2, v2, c[0]))
      u1 = u2, v1 = v2;
    printf("%lf %lf\n", u1, v1);
  } else if (delta2 < eps) {
    double u1, v1, u2, v2;
    int ret = Case2(u1, v1, u2, v2, 2);
    if (ret == -1) return 0;
    if (ret == 1 &&
        IntercrossCircle(u1, v1, c[0]) > IntercrossCircle(u2, v2, c[0]))
      u1 = u2, v1 = v2;
    printf("%lf %lf\n", u1, v1);
  } else {
    double u1, v1, u2, v2;
    int ret = Case3(u1, v1, u2, v2);
    if (ret == -1) return 0;
    if (ret == 1 &&
        IntercrossCircle(u1, v1, c[0]) > IntercrossCircle(u2, v2, c[0]))
      u1 = u2, v1 = v2;
    printf("%lf %lf\n", u1, v1);
  }
  return 0;
}