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.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Scanner;
import java.util.StringTokenizer;

/**
 *
 */
public class CodeForce2C {
    public static final DecimalFormat DF = new DecimalFormat("0.00000", new DecimalFormatSymbols(Locale.US));
    public static void main(String[] args) {

        double xa=0, ya=0, ra=0;
        double xb=0, yb=0, rb=0;
        double xc=0, yc=0, rc=0;

        Scanner sc = new Scanner(System.in);
        sc.useLocale(Locale.US);
        while (sc.hasNextLine()) {
            String line = sc.nextLine();
            StringTokenizer st = new StringTokenizer(line, " \n\r");
            while (st.hasMoreTokens()) {
                xa = java.lang.Double.parseDouble(st.nextToken());
                ya = java.lang.Double.parseDouble(st.nextToken());
                ra = java.lang.Double.parseDouble(st.nextToken());
            }
            line = sc.nextLine();
            st = new StringTokenizer(line, " \n\r");
            while (st.hasMoreTokens()) {
                xb = java.lang.Double.parseDouble(st.nextToken());
                yb = java.lang.Double.parseDouble(st.nextToken());
                rb = java.lang.Double.parseDouble(st.nextToken());
            }
            line = sc.nextLine();
            st = new StringTokenizer(line, " \n\r");
            while (st.hasMoreTokens()) {
                xc = java.lang.Double.parseDouble(st.nextToken());
                yc = java.lang.Double.parseDouble(st.nextToken());
                rc = java.lang.Double.parseDouble(st.nextToken());
            }

            computeBestPointOfView(xa, ya, ra, xb, yb, rb, xc, yc, rc);
        }
        // }
    }

    public static void computeBestPointOfView(double xa, double ya, double ra,
            double xb, double yb, double rb, double xc, double yc, double rc) {
        // Three stadium centers
        Point2D A = new Point2D.Double(xa, ya);
        Point2D B = new Point2D.Double(xb, yb);
        Point2D C = new Point2D.Double(xc, yc);

        // Midpoints for use when radii are equals
        Point2D midAB = new Point2D.Double((A.getX() + B.getX()) / 2.0,
                (A.getY() + B.getY()) / 2.0);
        Point2D midAC = new Point2D.Double((A.getX() + C.getX()) / 2.0,
                (A.getY() + C.getY()) / 2.0);
        Point2D midBC = new Point2D.Double((C.getX() + B.getX()) / 2.0,
                (C.getY() + B.getY()) / 2.0);

        Point2D midABshifted = new Point2D.Double(midAB.getX()
                - (B.getY() - A.getY()), midAB.getY()
                + (B.getX() - A.getX()));
        Point2D midACshifted = new Point2D.Double(midAC.getX()
                - (C.getY() - A.getY()), midAC.getY()
                + (C.getX() - A.getX()));
        Point2D midBCshifted = new Point2D.Double(midBC.getX()
                - (C.getY() - B.getY()), midBC.getY()
                + (C.getX() - B.getX()));

        
        Point2D[] ijAB = getIJ(A, B, ra, rb);
        Point2D centerAB = new Point2D.Double(
                (ijAB[0].getX() + ijAB[1].getX()) / 2.0,
                (ijAB[0].getY() + ijAB[1].getY()) / 2.0);
        double rAB = ijAB[0].distance(ijAB[1]) / 2.0;

        Point2D[] ijBC = getIJ(B, C, rb, rc);
        Point2D centerBC = new Point2D.Double(
                (ijBC[0].getX() + ijBC[1].getX()) / 2.0,
                (ijBC[0].getY() + ijBC[1].getY()) / 2.0);
        double rBC = ijBC[0].distance(ijBC[1]) / 2.0;

        Point2D[] ijAC = getIJ(A, C, ra, rc);
        Point2D centerAC = new Point2D.Double(
                (ijAC[0].getX() + ijAC[1].getX()) / 2.0,
                (ijAC[0].getY() + ijAC[1].getY()) / 2.0);
        double rAC = ijAC[0].distance(ijAC[1]) / 2.0;

//      System.out.println("A ("+xa+","+ya+","+ra+")");
//      System.out.println("B ("+xb+","+yb+","+rb+")");
//      System.out.println("C ("+xc+","+yc+","+rc+")");
        if (ra == rb && rb == rc) {
            // Intersection des médiatrices 3 droites : 1 point unique,
            // centre du cercle circonscrit au triangle ABC
            Point2D[] ptsABAC = getIntersectionPointTwoLines(midAB,
                    midABshifted, midAC, midACshifted);
//           Point2D[] ptsABBC = getIntersectionPointTwoLines(midAB,
//           midABshifted, midBC, midBCshifted);
//           Point2D[] ptsACBC = getIntersectionPointTwoLines(midAB,
//           midABshifted, midAC, midACshifted);
            printPoint(ptsABAC[0]);
//          printPoint(ptsABBC[0]);
//          printPoint(ptsACBC[0]);
            
        } else {
            // s
            if (ra == rb) {
                // mediatrice AB, cercle : 0,1 ou 2 points
                // la mediatrice passe par le milieu de AB (midAB)
                // mediatrice, cercle de centre centerAC,rayon rAC
                // centerAC.getX()+centerAC.getY();
                Point2D[] ptsCircACBC = getIntersectionPointsTwoCircles(
                        centerAC, centerBC, rAC, rBC);
                if (ptsCircACBC.length == 2) {
                    double angle1 = 0;
                    double angle2 = 0;
                    List<Point2D> selected = new ArrayList<Point2D>();
                    if (Math.abs(ptsCircACBC[0].distance(A) - ptsCircACBC[0]
                            .distance(B)) < 1e-7) {                     
                        // Point sur mediatrice AB
                        selected.add(ptsCircACBC[0]);
                    }
                    if (Math.abs(ptsCircACBC[1].distance(A) - ptsCircACBC[1]
                            .distance(B)) < 1e-7) {
                        // Point sur mediatrice AB
                        selected.add(ptsCircACBC[1]);
                    }
                    if (selected.size() == 2) {
                        angle1 = Math.asin(ra / selected.get(0).distance(A));
                        angle2 = Math.asin(ra / selected.get(1).distance(A));
                        if (angle1 > angle2) {
                            printPoint(selected.get(0));
                        } else {
                            printPoint(selected.get(1));
                        }
                    } else if (selected.size() == 1){
                        printPoint(selected.get(0));
                    } else {
                        // Nothing
                        System.out.println();                       
                    }
                } else if (ptsCircACBC.length == 1) {
                    if (ptsCircACBC[0].distance(A) == ptsCircACBC[0]
                            .distance(B)) {
                        printPoint(ptsCircACBC[0]);
                    }
                } else {
                    // Nothing
                    System.out.println();
                }

            } else if (rb == rc) {
                // mediatrice BC, cercle : 0,1 ou 2 points
                // la mediatrice passe par le milieu de AB (midBC)
                Point2D[] ptsCircACAB = getIntersectionPointsTwoCircles(
                        centerAC, centerAB, rAC, rAB);
                if (ptsCircACAB.length == 2) {
                    double angle1 = 0;
                    double angle2 = 0;
                    List<Point2D> selected = new ArrayList<Point2D>();
                    if (Math.abs(ptsCircACAB[0].distance(B) - ptsCircACAB[0]
                            .distance(C)) < 1e-7) {
                        // Point sur mediatrice AB
                        selected.add(ptsCircACAB[0]);
                    }
                    if (Math.abs(ptsCircACAB[1].distance(B) - ptsCircACAB[1]
                            .distance(C))< 1e-7) {
                        // Point sur mediatrice AB
                        selected.add(ptsCircACAB[1]);
                    }
                    if (selected.size() == 2) {
                        angle1 = Math.asin(ra / selected.get(0).distance(A));
                        angle2 = Math.asin(ra / selected.get(1).distance(A));
                        if (angle1 > angle2) {
                            printPoint(selected.get(0));
                        } else {
                            printPoint(selected.get(1));
                        }
                    } else if (selected.size() == 1){
                        printPoint(selected.get(0));
                    } else {
                        // Nothing
                        System.out.println();                       
                    }
                } else if (ptsCircACAB.length == 1) {
                    if (ptsCircACAB[0].distance(B) == ptsCircACAB[0]
                            .distance(C)) {
                        printPoint(ptsCircACAB[0]);
                    }
                } else {
                    // Nothing
                    System.out.println();
                }
            } else if (ra == rc) {
                // mediatrice AC, cercle : 0,1 ou 2 points
                // la mediatrice passe par le milieu de AC (midAC)
                Point2D[] ptsCircABBC = getIntersectionPointsTwoCircles(
                        centerAB, centerBC, rAB, rBC);
                if (ptsCircABBC.length == 2) {
                    double angle1 = 0;
                    double angle2 = 0;
                    List<Point2D> selected = new ArrayList<Point2D>();
                    if (Math.abs(ptsCircABBC[0].distance(A) - ptsCircABBC[0]
                            .distance(C)) < 1e-7) {
                        // Point sur mediatrice AB
                        selected.add(ptsCircABBC[0]);
                    }
                    if (Math.abs(ptsCircABBC[1].distance(A) - ptsCircABBC[1]
                            .distance(C)) < 1e-7) {
                        // Point sur mediatrice AB
                        selected.add(ptsCircABBC[1]);
                    }
                    if (selected.size() == 2) {
                        angle1 = Math.asin(ra / selected.get(0).distance(A));
                        angle2 = Math.asin(ra / selected.get(1).distance(A));
                        if (angle1 > angle2) {
                            printPoint(selected.get(0));
                        } else {
                            printPoint(selected.get(1));
                        }
                    } else if (selected.size() == 1){
                        printPoint(selected.get(0));
                    } else {
                        // Nothing
                        System.out.println();                       
                    }
                } else if (ptsCircABBC.length == 1) {
                    if (ptsCircABBC[0].distance(A) == ptsCircABBC[0]
                            .distance(C)) {
                        printPoint(ptsCircABBC[0]);
                    }
                } else {
                    // Nothing
                    System.out.println();
                }

            } else {
                // ra,rb et rc distincts : intersection de 3 cercles : 1
                // point
                Point2D[] ptsCircACBC = getIntersectionPointsTwoCircles(
                        centerAC, centerBC, rAC, rBC);

                Point2D[] ptsCircABBC = getIntersectionPointsTwoCircles(
                        centerAB, centerBC, rAB, rBC);

                Point2D[] ptsCircABAC = getIntersectionPointsTwoCircles(
                        centerAB, centerAC, rAB, rAC);
                

                if (ptsCircACBC.length == 2) {
                    // 2 solutions : calcul des angles pour départager
                    double angle1 = Math.asin(ra
                            / ptsCircACBC[0].distance(A));
                    double angle2 = Math.asin(ra
                            / ptsCircACBC[1].distance(A));
                    if (angle1 > angle2) {
                        printPoint(ptsCircACBC[0]);
                    } else {
                        printPoint(ptsCircACBC[1]);
                    }
                } else if (ptsCircACBC.length == 1) {
                    printPoint(ptsCircACBC[0]);
                } else {
                    // No solution
                    System.out.println();
                }
            }
        }
    }

    private static void printPoint(Point2D point2d) {
        //System.out.println(DF.format(point2d.getX()) + " " + DF.format(point2d.getY()));
        System.out.println(point2d.getX() + " " + point2d.getY());
    }

    // I,J
    static Point2D[] getIJ(Point2D A, Point2D B, double ra, double rb) {
        double k = rb / ra;
        return new Point2D[] { getBarycenter(A, B, k, 1),
                getBarycenter(A, B, -k, 1) };
    }

    //
    static Point2D getBarycenter(Point2D p1, Point2D p2, double w1, double w2) {
        if (w1 + w2 == 0) {
            return new Point2D.Double(java.lang.Double.POSITIVE_INFINITY,
                    java.lang.Double.POSITIVE_INFINITY);
        } else {
            return new Point2D.Double((w1 * p1.getX() + w2 * p2.getX())
                    / (w1 + w2), (w1 * p1.getY() + w2 * p2.getY()) / (w1 + w2));
        }
    }

    static Point2D[] getIntersectionPointsTwoCircles(Point2D A, Point2D B,
            double ra, double rb) {
        double dist = A.distance(B);
        if (dist < ra + rb) {
            // 2 points d'intersection
            double ux = 0;
            double uy = 0;
            ux = (B.getX() - A.getX()) / dist;
            uy = (B.getY() - A.getY()) / dist;
            double vx = -uy;
            double vy = ux;
            double x = (dist + (ra * ra - rb * rb) / dist) / 2.0;
            double y = Math.sqrt(ra * ra - x * x);
            return new Point2D.Double[] {
                    new Point2D.Double(A.getX() + ux * x + vx * y, A.getY()
                            + uy * x + vy * y),
                    new Point2D.Double(A.getX() + ux * x - vx * y, A.getY()
                            + uy * x - vy * y) };
        } else if (dist == ra + rb) {
            // 1 point d'intersection
            double ux = 0;
            double uy = 0;
            ux = (B.getX() - A.getX()) / dist;
            uy = (B.getY() - A.getY()) / dist;
            return new Point2D.Double[] { new Point2D.Double(
                    A.getX() + ux * ra, A.getY() + uy * ra) };
        } else {
            // Pas d'intersection
            return new Point2D.Double[0];
        }

    }

    /**
     * @param A
     * @param B
     * @param ra
     * @param rb
     * @return
     */
    static Point2D[] getIntersection(Point2D A, Point2D B, double ra, double rb) {
        double a = 2 * (B.getX() - A.getX());
        double b = 2 * (B.getY() - A.getY());
        double c = (B.getX() - A.getX()) * (B.getX() - A.getX())
                + (B.getY() - A.getY()) * (B.getY() - A.getY()) - rb * rb + ra
                * ra;
        double delta = (2.0 * a * c) * (2.0 * a * c) - 4.0 * (a * a + b * b)
                * (c * c - b * b * ra * ra);
        if (delta < 0)
            return new Point2D[0];
        double xp = A.getX() + (2.0 * a * c - Math.sqrt(delta))
                / (2.0 * (a * a + b * b));
        double xq = A.getX() + (2.0 * a * c + Math.sqrt(delta))
                / (2.0 * (a * a + b * b));
        double yp = 0;
        double yq = 0;
        if (b == 0) {
            yp = A.getY()
                    + b
                    / 2.0
                    + Math.sqrt(rb * rb - ((2.0 * c - a * a) / (2.0 * a))
                            * ((2.0 * c - a * a) / (2.0 * a)));
            yq = A.getY()
                    + b
                    / 2.0
                    - Math.sqrt(rb * rb - ((2.0 * c - a * a) / (2.0 * a))
                            * ((2.0 * c - a * a) / (2.0 * a)));
        } else {
            yp = A.getY() + (c - a * (xp - A.getX())) / b;
            yq = A.getY() + (c - a * (xq - A.getX())) / b;
        }
        return new Point2D.Double[] { new Point2D.Double(xp, yp),
                new Point2D.Double(xq, yq) };
    }

    /**
     * On suppose que les points sont distincts
     * 
     * @param A1
     * @param A2
     * @param B1
     * @param B2
     * @return
     */
    static Point2D[] getIntersectionPointTwoLines(Point2D A1, Point2D A2,
            Point2D B1, Point2D B2) {
        // AM.perp(AB) = 0
        // -(x-xa).(yb-ya)+(y-ya).(xb-xa) = 0
        // -(yb-ya).x+(xb-xa).y = -xa.(yb-ya)+ya*(xb-xa)
        double a1 = -(A2.getY() - A1.getY());
        double b1 = A2.getX() - A1.getX();
        double c1 = A1.getX() * a1 + A1.getY() * b1;

        double a2 = -(B2.getY() - B1.getY());
        double b2 = B2.getX() - B1.getX();
        double c2 = B1.getX() * a2 + B1.getY() * b2;

        double delta = (a1 * b2 - a2 * b1);
        double deltax = (c1 * b2 - c2 * b1);
        double deltay = (a1 * c2 - a2 * c1);

        if (delta == 0) {
            return new Point2D.Double[0];
        } else {
            return new Point2D.Double[] { new Point2D.Double(deltax / delta,
                    deltay / delta) };
        }

    }
}