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.Scanner;
import java.util.Arrays;
import java.util.Locale;

public class Main {
	private static double EPS = 0.000000001;
	public static void main(String[] args) {
		Scanner cin = new Scanner(System.in);
		long x1 = cin.nextInt(), y1 = cin.nextInt(), r1 = cin.nextInt();
		long x2 = cin.nextInt(), y2 = cin.nextInt(), r2 = cin.nextInt();
		long x3 = cin.nextInt(), y3 = cin.nextInt(), r3 = cin.nextInt();
		double[] result = null;
		if (r1 == r2 && r2 == r3) {
			// two lines
			result = twoLineIntersect(2 * (x1 - x2), 2 * (y1 - y2), y2*y2 - y1*y1 + x2*x2 - x1*x1, 2 * (x1 - x3), 2 * (y1 - y3), y3*y3 - y1*y1 + x3*x3 - x1*x1);
		} else if (r1 != r2 && r2 != r3) {
			double a3 = ((double) (x1 * r2 * r2 - x2 * r1 * r1)) / (r2 * r2 - r1 * r1);
			double b3 = ((double) (y1 * r2 * r2 - y2 * r1 * r1)) / (r2 * r2 - r1 * r1);
			double c3 = Math.sqrt(a3 * a3 + b3 * b3 + ((double) ( r1 * r1 * (x2 * x2 + y2 * y2 ) - r2 * r2 * (x1 * x1 + y1 * y1))) / (r2 * r2 - r1 * r1));

			double a2 = ((double) (x3 * r2 * r2 - x2 * r3 * r3)) / (r2 * r2 - r3 * r3);
			double b2 = ((double) (y3 * r2 * r2 - y2 * r3 * r3)) / (r2 * r2 - r3 * r3);
			double c2 = Math.sqrt(a2 * a2 + b2 * b2 + ((double) ( r3 * r3 * (x2 * x2 + y2 * y2 ) - r2 * r2 * (x3 * x3 + y3 * y3))) / (r2 * r2 - r3 * r3));

			double a1 = 2 * (a3 - a2);
			double b1 = 2 * (b3 - b2);
			double c1 = c3 * c3 - c2 * c2 + (a3 - a2) * (a3 - a2) + (b3 - b2) * (b3 - b2);
			result = lineAndCircle(a1, b1, c1, c3);
			for (int i = 0; i < result.length; i += 2) {
				result[i] = result[i] + a3;
				result[i + 1] = result[i + 1] + b3;
			}	
		} else {
			// line and circle
			if (r1 == r3 && r2 != r3) {
				long tmp = r2; r2 = r3; r3 = tmp;
				tmp = x2; x2 = x3; x3 = tmp;
				tmp = y2; y2 = y3; y3 = tmp;	
			} else if (r2 == r3 && r1 != r3) {
				long tmp = r1; r1 = r3; r3 = tmp;
				tmp = x1; x1 = x3; x3 = tmp;
				tmp = y1; y1 = y3; y3 = tmp;
			}
			long a1 = 2 * (x1 - x2);
			long b1 = 2 * (y1 - y2);
			long c1 = y2*y2 - y1*y1 + x2*x2 - x1*x1;


			double a2 = ((double) (x3 * r2 * r2 - x2 * r3 * r3)) / (r2 * r2 - r3 * r3);
			double b2 = ((double) (y3 * r2 * r2 - y2 * r3 * r3)) / (r2 * r2 - r3 * r3);
			double c2 = Math.sqrt(a2 * a2 + b2 * b2 + ((double) ( r3 * r3 * (x2 * x2 + y2 * y2 ) - r2 * r2 * (x3 * x3 + y3 * y3))) / (r2 * r2 - r3 * r3));
			result = lineAndCircle(a1, b1, c1 + a1 * a2 + b1 * b2, c2);
			for (int i = 0; i < result.length; i += 2) {
				result[i] = result[i] + a2;
				result[i + 1] = result[i + 1] + b2;
			}
		}
		result = determineMax(x1, y1, r1, x2, y2, r2, x3, y3, r3, result);	
		if (result != null && result.length != 0) {
			System.out.printf(Locale.US, "%.5f %.5f", result[0], result[1]);
		}
	}

	public static double[] determineMax(double x1, double y1, double r1, double x2, double y2, double r2, double x3, double y3, double r3, double[] result) {
		if (result == null || result.length == 0) {
			return new double[] {};
		}
		double[] bestResult = new double[] {};
		double rmin = 1000000000000.0;
		for (int i = 0; i < result.length; i += 2) {
			double x = result[i];
			double y = result[i + 1];
			double len1 = Math.sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
			double len2 = Math.sqrt((x - x2) * (x - x2) + (y - y2) * (y - y2));
			double len3 = Math.sqrt((x - x3) * (x - x3) + (y - y3) * (y - y3));
			double min = Math.min(Math.min(len1, len2), len3);  
			if (Math.abs((r1 / len1) - (r2 / len2)) < EPS && Math.abs((r1 / len1) - (r3 / len3)) < EPS && min < rmin) {
				bestResult = new double[] {x, y};
				rmin = min;	
			}
		}
		return bestResult;			
	}

	public static double[] lineAndCircle(double a, double b, double c, double r) {
		double x0 = -a*c/(a*a+b*b),  y0 = -b*c/(a*a+b*b);
		if (c * c > r*r*(a*a+b*b) + EPS) {
			return new double[] {};
		} if (Math.abs (c*c - r*r*(a*a+b*b)) < EPS) {
			return new double[] {x0, y0};
		} else {
			double d = r*r - c*c/(a*a+b*b);
			double mult = Math.sqrt (d / (a*a+b*b));
			double ax,ay,bx,by;
			ax = x0 + b * mult;
			bx = x0 - b * mult;
			ay = y0 - a * mult;
			by = y0 + a * mult;
			return new double[] { ax,  ay , bx, by } ;
		}
	}

	public static double[] twoLineIntersect(double a1, double b1, double c1, double a2, double b2, double c2) {
		if (Math.abs(a1 * b2 - a2 * b1) < EPS ) {
			return new double[] {};
		}
		double x = (c1 * b2 - c2 * b1) / (b1 * a2 - a1 * b2);
		double y = (c1 * a2 - c2 * a1) / (b2 * a1 - b1 * a2);			
		return new double[] { x, y };
	}
}