Problem: Igor the analyst fell asleep on the work and had a strange dream. In the dream his desk was crowded with computer mice, so he bought a mousetrap to catch them.

The desk can be considered as an infinite plane, then the mousetrap is a rectangle which sides are parallel to the axes, and which opposite sides are located in points (x1, y1) and (x2, y2).

Igor wants to catch all mice. Igor has analysed their behavior and discovered that each mouse is moving along a straight line with constant speed, the speed of the i-th mouse is equal to (vix, viy), that means that the x coordinate of the mouse increases by vix units per second, while the y coordinates increases by viy units. The mousetrap is open initially so that the mice are able to move freely on the desk. Igor can close the mousetrap at any moment catching all the mice that are strictly inside the mousetrap.

Igor works a lot, so he is busy in the dream as well, and he asks you to write a program that by given mousetrap's coordinates, the initial coordinates of the mice and their speeds determines the earliest time moment in which he is able to catch all the mice. Please note that Igor can close the mousetrap only once.

Input

The first line contains single integer n (1 ≤ n ≤ 100 000) — the number of computer mice on the desk.

The second line contains four integers x1, y1, x2 and y2 (0 ≤ x1 ≤ x2 ≤ 100 000), (0 ≤ y1 ≤ y2 ≤ 100 000) — the coordinates of the opposite corners of the mousetrap.

The next n lines contain the information about mice.

The i-th of these lines contains four integers rix, riy, vix and viy, (0 ≤ rix, riy ≤ 100 000,  - 100 000 ≤ vix, viy ≤ 100 000), where (rix, riy) is the initial position of the mouse, and (vix, viy) is its speed.

Output

In the only line print minimum possible non-negative number t such that if Igor closes the mousetrap at t seconds from the beginning, then all the mice are strictly inside the mousetrap. If there is no such t, print -1.

Your answer is considered correct if its absolute or relative error doesn't exceed 10 - 6. 

Formally, let your answer be a, and the jury's answer be b. Your answer is considered correct if <image>.

Examples

Input

4
7 7 9 8
3 5 7 5
7 5 2 4
3 3 7 8
6 6 3 2


Output

0.57142857142857139685


Input

4
7 7 9 8
0 3 -5 4
5 0 5 4
9 9 -1 -6
10 5 -7 -10


Output

-1

Note

Here is a picture of the first sample

Points A, B, C, D - start mice positions, segments are their paths.

<image>

Then, at first time when all mice will be in rectangle it will be looks like this:

<image>

Here is a picture of the second sample

<image>

Points A, D, B will never enter rectangle.

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;

public class ProbC {
	public static void main(String[] args) {
		ProbC sol = new ProbC();
		sol.start();
	}

	StringBuffer printstr;

	public void print(Object o){ 
//		System.out.print(o); 
	}
	public void println(Object o) { 
//		System.out.println(o); 
	}

	public void bufp(Object o){ printstr.append(o); }
	public void bufpl(Object o){ printstr.append(o).append('\n'); }
	public void bufpl() { printstr.append('\n'); }
	public void bufp(char[] c, int offset, int len){ printstr.append(c, offset, len); }
	public void bufpl(char[] c, int offset, int len){ printstr.append(c, offset, len).append('\n'); }

	public void start(){
//		test();
		submit();
	}
	
	/*
4
7 7 9 8
3 5 7 5
7 5 2 4
3 3 7 8
6 6 3 2

TestCase #4
4
17501 63318 51967 74514
1305 84026 79493 -78504
41159 81000 -44104 -42722
31063 65435 25578 33487
18330 79949 83467 -74531

TestCase #34
1
0 0 10 10
5 5 0 0

TestCase #44
1
0 0 1 1
0 0 0 0
	*/
	public void submit(){
	try{
		printstr = new StringBuffer();
		Scanner scan = new Scanner(System.in);
		BufferedReader rdr = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(rdr.readLine());
		String[] s = rdr.readLine().split(" ");
		int[] trap = new int[4];
		for(int i=0;i<4;i++) trap[i] = Integer.parseInt(s[i]);
		int[][] mice = new int[n][4];
		for(int i=0;i<n;i++){
			s = rdr.readLine().split(" ");
			for(int j=0;j<4;j++) mice[i][j] = Integer.parseInt(s[j]);
		}
		scan.close();
		
		mouseTrap(n, trap, mice);
		System.out.println(printstr);
		System.out.flush();
	}
	catch(Exception e){}
	}
	
	public void mouseTrap(int n, int[] trap, int[][] mice){
		Double min = null;
		Double max = null;
		int[][] trappoints = {
			{trap[0], trap[1]},
			{trap[0], trap[3]},
			{trap[2], trap[3]},
			{trap[2], trap[1]}
		};
		for(int i=0;i<n;i++){
			if(mice[i][2]==0 && mice[i][3]==0){
				//if a mouse has velocity 0, determin if it stays in the trap forever
				int[] pos = {mice[i][0], mice[i][1]};
				long[] areas = new long[4];
				for(int j=0;j<4;j++) areas[j] = area(
					new int[] {trappoints[j][0] - pos[0], trappoints[j][1] - pos[1]},
					new int[] {trappoints[(j+1)%4][0] - pos[0], trappoints[(j+1)%4][1] - pos[1]}
				);
//				println(i+" "+areas[0]+" "+areas[1]+" "+areas[2]+" "+areas[3]);
				if(areas[0]>0 && areas[1]>0 && areas[2]>0 && areas[3]>0) continue;
				if(areas[0]<0 && areas[1]<0 && areas[2]<0 && areas[3]<0) continue;
				bufpl(-1);
				println(i+" fail");
				return;
			}
			
			Double[] times = new Double[4];
			int count = 0;
			int zero = 0;
			for(int j=0;j<4;j++){
				times[j] = getTime(mice[i], new int[][]{
					trappoints[j], trappoints[(j+1)%4]
				});
				if(times[j]==null) continue;
				println("mouse "+i+" time "+j+" ="+times[j]);
				count += 1;
				if(times[j]==0) zero += 1;
			}
			//determine if this mouse ever go into the trap
			if(count<2 || count<=zero){
				println(i+" oh..." + count+" "+zero);
				bufpl(-1);
				return;
			}
			
			Double tmpmin = null; //the time this mouse comes in the trap
			Double tmpmax = null; //the time this mouse comes out of the trap
			for(int j=0;j<4;j++) if(times[j]!=null){
				if(tmpmin==null || tmpmin>times[j]) tmpmin = times[j];
				if(tmpmax==null || tmpmax<times[j]) tmpmax = times[j];
			}
			println("mouse "+i+" in and out: "+" "+tmpmin+" "+tmpmax);
			
			if(max==null || max>tmpmax) max = tmpmax; //max = min { all tmpmax values}
			if(min==null || min<tmpmin) min = tmpmin; //min = max { all tmpmin values}
		}
		
		if(min==null){
			//all mice stays in the trap forever
			bufpl(0);
			return;
		}
		min = Math.nextUp(min);
		if(min<0) min = (double) 0;
		if(min>=max){
			bufpl(-1);
			return;
		}
		bufpl(min);
		
	}
	
	public void test(){
		int[] mouse = {18330,79949,83467,-74531};
		int[] p = {17501,63318,51967,74514};
		int[][] points = {
			{p[0],p[1]}, {p[0],p[3]}, {p[2],p[3]}, {p[2],p[1]}
		};
		Double t = getTime(mouse, new int[][] {points[1], points[2]});
		if(t!=null) println(t);
	}
	
	public Double getTime(int[] mouse, int[][] points){
		println("Computing time from mouse "+mouse[0]+" "+mouse[1]+" "+mouse[2]+" "+mouse[3]);
		println("to "+points[0][0]+" "+points[0][1]+" "+points[1][0]+" "+points[1][1]);
		int[] pos = {mouse[0], mouse[1]};
		int[] vel = {mouse[2], mouse[3]};
		
		long area1 = area(
			new int[] {points[0][0] - pos[0], points[0][1] - pos[1]},
			vel
		);
		long area2 = area(
			new int[] {points[1][0] - pos[0], points[1][1] - pos[1]},
			vel
		);
		
		long parallel = area(
			new int[] {points[1][0] - points[0][0], points[1][1] - points[0][1]},
			vel
		);
//		println("here1a "+area1+" "+area2);
		if(area1>0 && area2>0) return null;
//		println("here1b");
		if(area1<0 && area2<0) return null;
//		println("here1c");
		
		long A = (long) (points[1][1] - points[0][1]);
		long B = (long) (points[0][0] - points[1][0]);
		
		long denom = A * vel[0] + B * vel[1]; 
		long numer = A * (points[0][0] - pos[0]) + B * (points[0][1] - pos[1]);
		if(numer==0){
			if(parallel==0){
				System.out.println(-1);
				System.out.flush();
				System.exit(0);
			}
			return (double) 0;
		}
		else{
//			println("here2");
			if(denom==0) return null;
//			println("here3");
			return numer / (double) denom;
		}
		
		
	}
	
	public long area(int[] v1, int[] v2){
		long ret = (long) 0;
		ret += ((long)v1[0] * v2[1]);
		ret -= ((long)v1[1] * v2[0]);
		return ret;
	}
}