Problem: It's a beautiful April day and Wallace is playing football with his friends. But his friends do not know that Wallace actually stayed home with Gromit and sent them his robotic self instead. Robo-Wallace has several advantages over the other guys. For example, he can hit the ball directly to the specified point. And yet, the notion of a giveaway is foreign to him. The combination of these features makes the Robo-Wallace the perfect footballer — as soon as the ball gets to him, he can just aim and hit the goal. He followed this tactics in the first half of the match, but he hit the goal rarely. The opposing team has a very good goalkeeper who catches most of the balls that fly directly into the goal. But Robo-Wallace is a quick thinker, he realized that he can cheat the goalkeeper. After all, they are playing in a football box with solid walls. Robo-Wallace can kick the ball to the other side, then the goalkeeper will not try to catch the ball. Then, if the ball bounces off the wall and flies into the goal, the goal will at last be scored.

Your task is to help Robo-Wallace to detect a spot on the wall of the football box, to which the robot should kick the ball, so that the ball bounces once and only once off this wall and goes straight to the goal. In the first half of the match Robo-Wallace got a ball in the head and was severely hit. As a result, some of the schemes have been damaged. Because of the damage, Robo-Wallace can only aim to his right wall (Robo-Wallace is standing with his face to the opposing team's goal).

The football box is rectangular. Let's introduce a two-dimensional coordinate system so that point (0, 0) lies in the lower left corner of the field, if you look at the box above. Robo-Wallace is playing for the team, whose goal is to the right. It is an improvised football field, so the gate of Robo-Wallace's rivals may be not in the middle of the left wall.

<image>

In the given coordinate system you are given: 

  * y1, y2 — the y-coordinates of the side pillars of the goalposts of robo-Wallace's opponents; 
  * yw — the y-coordinate of the wall to which Robo-Wallace is aiming; 
  * xb, yb — the coordinates of the ball's position when it is hit; 
  * r — the radius of the ball. 



A goal is scored when the center of the ball crosses the OY axis in the given coordinate system between (0, y1) and (0, y2). The ball moves along a straight line. The ball's hit on the wall is perfectly elastic (the ball does not shrink from the hit), the angle of incidence equals the angle of reflection. If the ball bounces off the wall not to the goal, that is, if it hits the other wall or the goal post, then the opposing team catches the ball and Robo-Wallace starts looking for miscalculation and gets dysfunctional. Such an outcome, if possible, should be avoided. We assume that the ball touches an object, if the distance from the center of the ball to the object is no greater than the ball radius r.

Input

The first and the single line contains integers y1, y2, yw, xb, yb, r (1 ≤ y1, y2, yw, xb, yb ≤ 106; y1 < y2 < yw; yb + r < yw; 2·r < y2 - y1).

It is guaranteed that the ball is positioned correctly in the field, doesn't cross any wall, doesn't touch the wall that Robo-Wallace is aiming at. The goal posts can't be located in the field corners.

Output

If Robo-Wallace can't score a goal in the described manner, print "-1" (without the quotes). Otherwise, print a single number xw — the abscissa of his point of aiming. 

If there are multiple points of aiming, print the abscissa of any of them. When checking the correctness of the answer, all comparisons are made with the permissible absolute error, equal to 10 - 8. 

It is recommended to print as many characters after the decimal point as possible.

Examples

Input

4 10 13 10 3 1


Output

4.3750000000


Input

1 4 6 2 2 1


Output

-1


Input

3 10 15 17 9 2


Output

11.3333333333

Note

Note that in the first and third samples other correct values of abscissa xw are also possible.

Solution (in JAVA):

Solution:
import java.util.ArrayList;
import java.util.Scanner;


public class A {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		double y1 = in.nextDouble();
		double y2 = in.nextDouble();
		double yw = in.nextDouble();
		double xb = in.nextDouble();
		double yb = in.nextDouble();
		double r = in.nextDouble();
		double eps = 0.00000001;
		yw -=r;
		Vector goalPoint = new Vector(0, y1+r+eps);
		Vector startPoint = new Vector(xb, yb+2*(yw-yb));
		Linesegment line = new Linesegment(new Vector(0, yw), new Vector(xb, yw));
		Linesegment shot = new Linesegment(goalPoint, startPoint);
		double d = distFromLine(new Vector(0, y2), shot);
		//System.out.println(d);
		try{
			Vector p = intersection(line, shot);
			if(d > r)System.out.println(p.x);
			else System.out.println(-1);
			
		} catch(Exception e){
			System.out.println(-1);
		}
	}

	public static Vector origo = new Vector(0, 0);

	// Returns the distance between 2 points
	public static double dist(Vector p1, Vector p2) {
		double dx = p2.x - p1.x, dy = p2.y - p1.y;
		return Math.sqrt(dx * dx + dy * dy);
	}

	// finds the vector v such that from + v = to
	public static Vector vector(Vector from, Vector to) {
		return new Vector(to.x - from.x, to.y - from.y);
	}

	// add two vectors or moves a point by direction and length of a vector
	public static Vector vAdd(Vector v1, Vector v2) {
		return new Vector(v1.x + v2.x, v1.y + v2.y);
	}

	// multiply a vector by a constant
	public static Vector vMul(Vector v, double c) {
		return new Vector(v.x * c, v.y * c);
	}

	// the dot product(scalar product) of two vectors
	public static double dot(Vector v1, Vector v2) {
		return v1.x * v2.x + v1.y * v2.y;
	}

	// the cross product of two vectors (positive if v1 points to the right of
	// v2)
	public static double cross(Vector v1, Vector v2) {
		return v1.x * v2.y - v1.y * v2.x;
	}

	// checks if two linesegments are parallel
	public static boolean isParallel(Linesegment l1, Linesegment l2) {
		return cross(vector(l1.p1, l1.p2), vector(l2.p1, l2.p2)) == 0;
	}

	// calculates the area of the triangle defined by p1,p2,p3
	public static double area(Vector p1, Vector p2, Vector p3) {
		Vector v1 = vector(p1, p2), v2 = vector(p1, p3);
		return 0.5 * Math.abs(cross(v1, v2));
	}

	// returns the angle between two vectors in the range 0 through 2pi.
	public static double angle(Vector v1, Vector v2) {
		double a1 = angle(v1), a2 = angle(v2);
		if (a2 >= a1)
			return a2 - a1;
		else
			return 2 * Math.PI + a2 - a1;
	}

	// returns the angle between the x-axis and the vector in the range 0
	// through 2pi.
	public static double angle(Vector v) {
		double angle = Math.atan2(v.y, v.x);
		if (angle < 0.0)
			angle += 2 * Math.PI;
		return angle;
	}
	
	

	// shortest distance between a line and a point, the linesegment is not
	// bounded by its endpoints but extended infinitely in both directions
	public static double distFromLine(Vector p, Linesegment l) {
		double area = area(p, l.p1, l.p2);
		return 2.0 * area / dist(l.p1, l.p2);
	}
	
	// Finds the point on the *line* (extended infinitely) AB that is closest to P.
	public static Vector line_closest_point(Vector A, Vector B, Vector P) {
	    double c = - dot(vector(P,A), vector(B,A)) / dot(vector(B,A), vector(B,A));
	    return new Vector(c * vector(B,A).x + A.x,
	                  c * vector(B,A).y + A.y );
	}

	// Finds the point on the *segment* AB that is closest to P.
	public static Vector segment_closest_point(Vector A, Vector B, Vector P) {
		double eps = 0.00001; // some value
	    if (dot(vector(P,A), vector(B,A)) > eps && dot(vector(P,B), vector(A,B)) > eps)
	        return line_closest_point(A, B, P);
	    if (dist(P, A) < dist(P, B))
	        return A;
	    else
	        return B;
	}

	public static double segment_point_distance(Vector A, Vector B, Vector P) {
	    return dist(P, segment_closest_point(A, B, P));
	}
	
	public static double segment_segment_distance(Vector A, Vector B, Vector C, Vector D) {
		double eps = 0.00001; // some value
		Vector P = new Vector(0, 0);
	    int k = line_intersection(A, B, C, D, P);
	    if (k == 0)
	        return dist(A, line_closest_point(C, D, A));
	    if (k == 2)
	        return 0;
	    if (segment_point_distance(A, B, P) < eps && segment_point_distance(C, D, P) < eps)
	        return 0;
	    return Math.min(Math.min(segment_point_distance(A, B, C), segment_point_distance(A, B, D)),
	               Math.min(segment_point_distance(C, D, A), segment_point_distance(C, D, B)));
	}

	// checks if the norm to the infinite extension of a line is inside the
	// closed linesegment.
	public static boolean hasNorm(Vector p, Linesegment l) {
		Vector vec1 = vector(l.p1, p), vec2 = vector(l.p1, l.p2);
		double dot = dot(vec1, vec2);
		if (dot < 0)
			return false;
		vec1 = vector(l.p2, p);
		vec2 = vector(l.p2, l.p1);
		dot = dot(vec1, vec2);
		return dot >= 0;
	}

	// finds the norm to the infinite extension of a linesegment.
	public static Vector norm(Vector p, Linesegment l) {
		if (p.equals(l.p1))
			return p;
		if (l.p1.equals(l.p2))
			return l.p1;
		Vector vec1 = vector(l.p1, p), vec2 = vector(l.p1, l.p2);
		double dot1 = dot(vec1, vec2), dot2 = dot(vec2, vec2);
		double c = dot1 / dot2;
		return vAdd(l.p1, vMul(vec2, c));
	}

	// finds the Point on the linesegment closest to p.
	public static Vector closestPoint(Vector p, Linesegment l) {
		if (hasNorm(p, l))
			return norm(p, l);
		double d1 = dist(p, l.p1), d2 = dist(p, l.p2);
		if (d1 < d2)
			return l.p1;
		else
			return l.p2;
	}

	// checks if two linesegments intersect
	public static boolean intersects(Linesegment l1, Linesegment l2) {
		// linesegment l2 intersects extension of linesegment l1
		Vector vec = vector(l1.p1, l1.p2), vec1 = vector(l1.p1, l2.p1), vec2 = vector(
				l1.p1, l2.p2);
		if (cross(vec, vec1) * cross(vec, vec2) > 0) return false;
		// linesegment l1 intersects extension of linesegment l2
		vec = vector(l2.p1, l2.p2);
		vec1 = vector(l2.p1, l1.p1);
		vec2 = vector(l2.p1, l1.p2);
		if (cross(vec, vec1) * cross(vec, vec2) > 0) return false;
		return true;
	}

	// finds the point where two linesegments intersects
	public static Vector intersection(Linesegment l1, Linesegment l2)
			throws Exception {
		if (!intersects(l1, l2))
			throw new Exception("No intersection");
		Vector n1 = norm(l1.p1, l2), n2 = norm(l1.p2, l2);
		double d1 = dist(n1, l1.p1), d2 = dist(n2, l1.p2);
		return vAdd(vMul(vector(origo, n1), d2 / (d1 + d2)),
				vMul(vector(origo, n2), d1 / (d1 + d2)));
	}
	
	// Computes the intersection of the *line* P0P1 with P2P3.
	// Returns 1 if there is one solution, 2 if the lines are the same (inf solutions)
	// and 0 if the lines are distinct and parallel (no solutions).
	public static int line_intersection(Vector P0, Vector P1, Vector P2, Vector P3, Vector P) {
		double eps = 0.0000001; //some number
	    double x0 = P0.x, x1 = P1.x, x2 = P2.x, x3 = P3.x;
	    double y0 = P0.y, y1 = P1.y, y2 = P2.y, y3 = P3.y;
	    double a = x0*y1 - y0*x1;
	    double b = x2*y3 - y2*x3;
	    double c = (x1 - x0)*(y3 - y2) - (y1 - y0)*(x3 - x2);
	    double d = (x1 - x0)*(y0 - y2) - (y1 - y0)*(x0 - x2);
	    if (Math.abs(c) < eps) {
	        if (Math.abs(d) < eps)
	            return 2;
	        else
	            return 0;
	    }
	    P.x = a*(x2 - x3) - b*(x0 - x1);
	    P.y = a*(y2 - y3) - b*(y0 - y1);
	    P.x /= c;
	    P.y /= c;
	    
	    return 1;
	}
	
	// Finds normal to vector
	public static Vector normal(Vector v1){
		return new Vector(-v1.y, v1.x);
	}
	
	static class Linesegment { // make sure dist(p1,p2)>0
		Vector p1, p2;
		Linesegment(Vector a, Vector b) {
			p1 = a;
			p2 = b;
		}
		public double length() {
			return dist(p1, p2);
		}
		public String toString() {
			return p1.toString() + "-" + p2.toString();
		}
		// returns a normal going through startpoint
		public Linesegment startNormal(){
			//normal vector
			Vector V = vector(p1, p2);
			Vector vc = new Vector(-V.y, V.x);
			return new Linesegment(p1, new Vector(p1.x + vc.x, p1.y + vc.y));
		}
		// returns a normal going through endpoint
		public Linesegment endNormal(){
			//normal vector
			Vector V = vector(p1, p2);
			Vector vc = new Vector(-V.y, V.x);
			return new Linesegment(p2, new Vector(p2.x + vc.x, p2.y + vc.y));
		}
		// Returns what side of the linesegment going  p1->p2 a point is. -1 left, 1 right, 0 on the line
		public int sideOfLine(Vector pkt){
			double ans = cross(vector(p1,p2), vector(p1, pkt));
			if(ans > 0) return -1;
			if(ans < 0) return 1;
			return 0;
		}
	}
	
	// returns a point's distance to a polygon, or 0.0 if inside
	static double distToPolygon(ArrayList<Linesegment> polygon, Vector p){
		Linesegment liin = new Linesegment(p, new Vector(1000000000.0, p.y+1));
		int numCross = 0;
		double least = 1000000000; // maximum dist we can have to point
		for(int i = 0; i < polygon.size(); i++){
			if(intersects(polygon.get(i), liin)){
				numCross++;
			}
			double dist = segment_point_distance(polygon.get(i).p1, polygon.get(i).p2, p);
			if(dist < least) least = dist;
		}
		if(numCross%2 == 0) return least;
		else return 0.0;
	}

	static class Line {
		double A, B, C;
		
		Line(Vector p1, Vector p2){
			Vector a = vector(origo, p1);
			Vector c = vector(p1, p2);
			Vector cN = normal(c);
			A = cN.x;
			B = cN.y;
			C = -dot(a, cN);
		}
		boolean onLine(Vector p) {
			return A * p.x + B * p.y + C == 0;
		}
	}

	static class Vector {
		double x, y;

		public Vector(double a, double b) {
			x = a;
			y = b;
		}
		public double length() {
			return Math.sqrt(x * x + y * y);
		}
		public boolean equals(Vector p) {
			return x == p.x && y == p.y;
		}
		public String toString() {
			return "<" + x + "," + y + ">";
		}
	}
}