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 JAVA):

Solution:
import java.util.*;

public class Commentator {
  
  public static final double EPS = 0.0000001;
  
  public static void main(String[] args) {
    Commentator cc = new Commentator();
    cc.solve();
    //cc.test();
  }
  
  public void test() {
    Circle one = new Circle(0, 0, 5);
    Circle two = new Circle(5, 0, 5);
    Point[] pts = one.intersectCircle(two);
    System.out.println(Arrays.deepToString(pts));
  }
  
  public void solve() {
    Scanner in = new Scanner(System.in);
    Circle a = new Circle(), b = new Circle(), c = new Circle();
    Circle[] temp = new Circle[] {a, b, c};
    for (int i = 0; i < 3; ++i) {
      temp[i].x = in.nextInt();
      temp[i].y = in.nextInt();
      temp[i].r = in.nextInt();
    }
    
    // 3 cases:
    // all radii same = 3 lines
    if (a.r == b.r && a.r == c.r) {
      Line one = a.getLine(b);
      Line two = b.getLine(c);
      Line three = c.getLine(a);
      //System.out.printf("ab:%s, bc:%s, ca:%s\n", one, two, three);
      Point p = one.intersectLine(two);
      //System.out.printf("one++two:%s\n", p);
      if (three.isPointOnLine(p)) {
        System.out.printf("%.5f %.5f", p.x, p.y);
      }
      return;
    }
    // 2 radii same, 1 diff = 2 circles, 1 line
    if (a.r == b.r || b.r == c.r || c.r == a.r) {
      if (b.r == c.r) {
        Circle tt = c;
        c = a;
        a = tt;
      } else if (c.r == a.r) {
        Circle tt = b;
        b = c;
        c = tt;
      }
      //a, b, same.
      Circle one = a.getCircle(c);
      Circle two = b.getCircle(c);
      Line three = a.getLine(b);
      //System.out.printf("ac:%s, bc:%s, ab:%s\n", one, two, three);
      Point[] pts = one.intersectCircle(two);
      //System.out.println(Arrays.deepToString(pts));
      Point ans = null;
      double bestDist = 0.0;
      for (int i = 0; i < pts.length; ++i) {
        if (!three.isPointOnLine(pts[i]))
          continue;
        if (ans == null) {
          ans = pts[i];
          bestDist = distance(pts[i].x, pts[i].y, a.x, a.y);
          continue;
        }
        double newDist = distance(pts[i].x, pts[i].y, a.x, a.y);
        if (newDist < bestDist) {
          bestDist = newDist;
          ans = pts[i];
        }
      }
      if (ans != null) {
        System.out.printf("%.5f %.5f", ans.x, ans.y);
      }
      return;
    }
    // all radii different = 3 circles
    Circle one = a.getCircle(b);
    Circle two = b.getCircle(c);
    Circle three = c.getCircle(a);
    Point[] pts = one.intersectCircle(two);
    //System.out.printf("ab:%s, bc:%s, ca:%s\n", one, two, three);
    //System.out.println(Arrays.deepToString(pts));
    Point ans = null;
    double bestDist = 0.0;
    for (int i = 0; i < pts.length; ++i) {
      if (!three.isPointOnCircle(pts[i]))
        continue;
      if (ans == null) {
        ans = pts[i];
        bestDist = distance(pts[i].x, pts[i].y, a.x, a.y);
        continue;
      }
      double newDist = distance(pts[i].x, pts[i].y, a.x, a.y);
      if (newDist < bestDist) {
        bestDist = newDist;
        ans = pts[i];
      }
    }
    if (ans != null) {
      System.out.printf("%.5f %.5f", ans.x, ans.y);
    }
    return;
  }
  
  public static boolean near(double a, double b) {
    return Math.abs(a - b) < EPS;
  }
  
  public static double distance(double x0, double y0, double x1, double y1) {
    return Math.sqrt( (x0 - x1)*(x0 - x1) + (y0 - y1)*(y0 - y1) );
  }
  
  class Point {
    double x;
    double y;
    
    public Point() {}
    public Point(double xx, double yy) {
      x = xx;
      y = yy;
    }
    
    public String toString() {return String.format("(%.5f, %.5f)", x, y); }
  }

  class Line {
    // y = mx + b
    boolean vert;
    double m;
    double b;
    
    public Line() {}
    public Line(double mm, double bb, boolean vv) {
      m = mm;
      b = bb;
      vert = vv;
    }
    
    public boolean isPointOnLine(Point p) {
      if (vert)
        return Math.abs(p.x - b) < EPS;
      return Math.abs(m*p.x+b - p.y) < EPS;
    }
    
    public Point intersectLine(Line l) {
      if (l.vert && vert || near(m, l.m))
        return null; // parallel, or identical.
      
      if (vert)
        return l.intersectLine(this);
      
      if(l.vert) {
        return new Point(l.b, m*l.b + b);
      }
      
      double x0 = (b - l.b) / (l.m - m);
      double y0 = m*x0 + b;
      return new Point(x0, y0);
    }
    
    public String toString() {
      if (!vert)
        return String.format("y=%.5fx + %.5f", m, b);
      return String.format("x=%.5f", b);
    }
  }

  class Circle {
    // (X - x)^2 + (Y - y)^2 = r^2
    double x;
    double y;
    double r;
    public Circle() {}
    public Circle(double xx, double yy, double rr) {
      x = xx;
      y = yy;
      r = rr;
    }
    
    public boolean isPointOnCircle(Point p) {
      double temp = Math.abs( (p.x - x)*(p.x - x) + (p.y - y)*(p.y - y) - r*r);
      //System.out.printf("check = %.14f\n", temp);
      return temp < EPS;
    }
    
    public Line getLine(Circle c) {
      double slope = 0.0;
      boolean vert = false;
      if (near(c.x, x)) {
        vert = true;
      } else {
        slope = (c.y - y) / (c.x - x);
      }
      double x0 = (c.x + x) / 2.0;
      double y0 = (c.y + y) / 2.0;
      
      double invertSlope = -1.0 / slope;
      if (Double.NEGATIVE_INFINITY == (invertSlope))
        vert = true;
      double b = y0 - invertSlope*x0;
      if (vert)
        b = x0;
      
      return new Line(invertSlope, b, vert);
    }
    
    // must have this circle with r > c.r
    public Circle getCircle(Circle c) {
      if (r < c.r)
        return c.getCircle(this);
      double dist = distance(c.x, c.y, x, y);
      double slope = 0.0;
      boolean vert = false;
      if (near(c.x, x)) {
        vert = true;
      } else {
        slope = (c.y - y) / (c.x -x );
      }
      double partial = c.r*c.r/(r*r-c.r*c.r)*dist;
      double dx = Math.sqrt( Math.pow(partial, 2) / (1 + slope*slope));
      double dy = slope*dx;
      if (vert)
        dy = partial;
      
      double x0 = (x > c.x) ? c.x - dx : c.x + dx;
      double y0 = (x > c.x) ? c.y - dy : c.y + dy;
      // x0, y0 = center of circle
      double rad = r*c.r/(r*r-c.r*c.r)*dist;
      return new Circle(x0, y0, rad);
    }
    
    public Point[] intersectCircle(Circle c) {
      double dist = distance(c.x, c.y, x, y);
      if (dist > (c.r + r + EPS))
        return new Point[0];
      if (near(c.x, x)) {
        Circle blah = new Circle(y, x, r);
        Circle other = new Circle(c.y, c.x, c.r);
        Point[] goo = blah.intersectCircle(other);
        for (int i = 0; i < goo.length; ++i) {
          double temp = goo[i].x;
          goo[i].x = goo[i].y;
          goo[i].y = temp;
        }
        return goo;
      }
      double t = (y - c.y) / (c.x - x);
      double u = (r*r -c.r*c.r - (x*x-c.x*c.x) - (y*y - c.y*c.y)) / (2*(c.x - x));
      double a = 1 + t*t;
      double b = (-2*y + 2*t*u - 2*x*t);
      double cc = -(r*r - y*y - x*x - u*u + 2*x*u);
      double y0 = (-b + Math.sqrt(b*b - 4*a*cc)) / (2*a);
      double x0 = t*y0 + u;
      
      double y1 = (-b - Math.sqrt(b*b - 4*a*cc)) / (2*a);
      double x1 = t*y1 + u;
      //System.out.printf("t:%.14f, u:%.14f, a:%.14f, b:%.14f, cc:%.14f, x0:%.14f, y0:%.14f, x1:%.14f, y1:%.14f\n\n", t, u, a, b, cc, x0, y0, x1, y1);
      if (near(x0, x1))
        return new Point[]{new Point(x0, y0)};
      else
        return new Point[]{new Point(x0, y0), new Point(x1, y1)};
    }
    
    public String toString() {
      return String.format("(%.14f,%.14f,%.14f)", x, y, r);
    }
  }
}