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 int oo = 0x3f3f3f3f;
const double eps = 1e-9;
int N, K;
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
};
struct Line {
  double A, B, C;
  Line(double a = 1, double b = 1, double c = 0) : A(a), B(b), C(c) {}
  void dbg() {
    {
      if (1) fprintf(stderr, "Line A: %.3lf B: %.3lf C: %.3lf\n", A, B, C);
    };
  }
};
struct Circle {
  Point m;
  double r;
  Circle(Point pt = Point(0, 0), double rr = 0) : m(pt), r(rr) {}
};
Line getLine(const Point& pa, const Point& push_back) {
  double a = push_back.y - pa.y;
  double b = pa.x - push_back.x;
  return Line(a, b, a * pa.x + b * pa.y);
}
Line getPerpendicularLine(const Line& li, const Point& pt) {
  return Line(-li.B, li.A, -li.B * pt.x + li.A * pt.y);
}
bool intersectLL(const Line& la, const Line& lb, Point& pt) {
  double det = la.A * lb.B - lb.A * la.B;
  if (abs(det) < eps) return false;
  pt.x = (la.C * lb.B - lb.C * la.B) / det;
  pt.y = (la.A * lb.C - lb.A * la.C) / det;
  return true;
}
double dist(const Point& a, const Point& b) {
  double dx = a.x - b.x;
  double dy = a.y - b.y;
  return sqrt(dx * dx + dy * dy);
}
Point operator+(const Point& a, const Point& b) {
  return Point(a.x + b.x, a.y + b.y);
}
Point operator-(const Point& a, const Point& b) {
  return Point(a.x - b.x, a.y - b.y);
}
Point sp[3];
double sr[3];
Line lines[2];
Circle circles[2];
Point points[4];
int main() {
  for (int i = (0); i < (3); i++) cin >> sp[i].x >> sp[i].y >> sr[i];
  int lin = 0;
  int cir = 0;
  int poi = 0;
  for (int i = (0); i < (2); i++) {
    if (abs(sr[i + 0] - sr[i + 1]) < eps) {
      Point m((sp[i + 0].x + sp[i + 1].x) / 2.0,
              (sp[i + 0].y + sp[i + 1].y) / 2.0);
      {
        if (1) fprintf(stderr, "m %.3lf %.3lf\n", m.x, m.y);
      };
      lines[lin++] = getPerpendicularLine(getLine(sp[i + 0], sp[i + 1]), m);
    } else {
      Point a, b;
      double ra, rb;
      if (sr[i + 0] < sr[i + 1]) {
        a = sp[i + 0];
        ra = sr[i + 0];
        b = sp[i + 1];
        rb = sr[i + 1];
      } else {
        a = sp[i + 1];
        ra = sr[i + 1];
        b = sp[i + 0];
        rb = sr[i + 0];
      }
      assert(ra < rb);
      Point ac1 = b - a;
      ac1.x *= ra / (rb + ra);
      ac1.y *= ra / (rb + ra);
      Point c1 = a + ac1;
      Point ac2 = a - b;
      ac2.x *= ra / (rb - ra);
      ac2.y *= ra / (rb - ra);
      Point c2 = a + ac2;
      Point m = c1 + c2;
      m.x /= 2.0;
      m.y /= 2.0;
      circles[cir++] = Circle(m, dist(m, c1));
    }
  }
  if (lin == 2 && cir == 0) {
    bool ret = intersectLL(lines[0], lines[1], points[poi]);
    assert(ret);
    poi++;
    lines[0].dbg();
    lines[1].dbg();
  } else if (lin == 1 && cir == 1) {
    do {
      Line perp = getPerpendicularLine(lines[0], circles[0].m);
      Point s;
      intersectLL(lines[0], perp, s);
      double d = dist(circles[0].m, s);
      d = circles[0].r * circles[0].r - d * d;
      if (abs(d) < eps) {
        points[poi++] = s;
        break;
      }
      if (d < 0) break;
      d = sqrt(d);
      double norm = dist(Point(0, 0), Point(perp.A, perp.B));
      points[poi++] =
          Point(s.x + (d * perp.A) / norm, s.y + (d * perp.B) / norm);
      points[poi++] =
          Point(s.x - (d * perp.A) / norm, s.y - (d * perp.B) / norm);
    } while (false);
  } else if (lin == 0 && cir == 2) {
    do {
      {
        if (1)
          fprintf(stderr, "circ 0  x %.3lf y %.3lf r %.3lf\n", circles[0].m.x,
                  circles[0].m.y, circles[0].r);
      };
      {
        if (1)
          fprintf(stderr, "circ 1  x %.3lf y %.3lf r %.3lf\n", circles[1].m.x,
                  circles[1].m.y, circles[1].r);
      };
      double dx = circles[1].m.x - circles[0].m.x;
      double dy = circles[1].m.y - circles[0].m.y;
      double d = sqrt(dx * dx + dy * dy);
      double rsum = circles[0].r + circles[1].r;
      double rdiff = abs(circles[0].r - circles[1].r);
      if (d > rsum || d < rdiff || (d < eps && rdiff < eps)) break;
      double x =
          (d * d + circles[0].r * circles[0].r - circles[1].r * circles[1].r) /
          (2 * d);
      if (abs(d - rsum) < eps || abs(d - rdiff) < eps) {
        points[poi++] =
            Point(circles[0].m.x + (x * dx) / d, circles[0].m.y + (x * dy) / d);
      } else {
        double y = sqrt(abs(circles[0].r * circles[0].r - x * x));
        points[poi++] = Point(circles[0].m.x + (x * dx - y * dy) / d,
                              circles[0].m.y + (x * dy + y * dx) / d);
        points[poi++] = Point(circles[0].m.x + (x * dx + y * dy) / d,
                              circles[0].m.y + (x * dy - y * dx) / d);
      }
    } while (false);
  } else {
    assert(false);
  }
  if (poi < 1) {
    return 0;
  }
  for (int i = int(poi) - 1; i >= (1); i--)
    for (int j = (0); j < (3); j++) {
      if (dist(points[i], sp[j]) < dist(points[i - 1], sp[j])) {
        swap(points[i - 1], points[i]);
        break;
      }
    }
  printf("%.5lf %.5lf\n", points[0].x, points[0].y);
}