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.awt.*;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.*;
import java.util.*;

public class h {
    public static void main(String[] args) throws Exception {
        FastScanner fs = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);

        int n = fs.nextInt();
        Point topLeft = null, topRight = null, bottomLeft = null, bottomRight = null;
        int px1 = fs.nextInt(), py1 = fs.nextInt(), px2 = fs.nextInt(), py2 = fs.nextInt();
        int width = Math.abs(px1 - px2), height = Math.abs(py1 - py2);
        if(px1 < px2 && py1 < py2) {
            bottomLeft = new Point(px1, py1, 0, 0);
            topRight = new Point(px2, py2,0, 0);
            topLeft = new Point(topRight.x - width, topRight.y, 0, 0);
            bottomRight = new Point(bottomLeft.x + width, bottomLeft.y, 0, 0);
        }
        if(px1 >= px2 && py1 <= py2) {
            bottomRight = new Point(px1, py1, 0, 0);
            topLeft = new Point(px2, py2,0, 0);
            topRight = new Point(topLeft.x + width, topLeft.y, 0, 0);
            bottomLeft = new Point(bottomRight.x - width, bottomRight.y, 0, 0);
        }
        if(px2 < px1 && py2 < py1) {
            bottomLeft = new Point(px2, py2, 0, 0);
            topRight = new Point(px1, py1,0, 0);
            topLeft = new Point(topRight.x - width, topRight.y, 0, 0);
            bottomRight = new Point(bottomLeft.x + width, bottomLeft.y, 0, 0);
        }
        if(px2 >= px1 && py2 <= py1) {
            bottomRight = new Point(px2, py2, 0, 0);
            topLeft = new Point(px1, py1,0, 0);
            topRight = new Point(topLeft.x + width, topLeft.y, 0, 0);
            bottomLeft = new Point(bottomRight.x - width, bottomRight.y, 0, 0);
        }

        rect = new Rectangle((int)topLeft.x, (int)topLeft.y, width, height);

        Point[] a = new Point[n];
        for(int i = 0; i < n; i++) {
            a[i] = new Point(fs.nextDouble(), fs.nextDouble(), fs.nextInt(), fs.nextInt());
        }

        double lo = 0, hi = 1e18;
        double best = 1e18;
        for(int bs = 0; bs < 100; bs++) {
            double time = (lo + hi) / 2.0;
            int ret = f(time, a);

            if(ret < 0) {

                System.out.println(ret);
                return;
            }

            if(ret == 0) {
                hi = time;
            } else if(ret == 1) {
                lo = time;
            } else if(ret == 2) {
                hi = time;
                best = Math.min(best, time);
            }

        }

        out.printf("%.20f\n", best == 1e18 ? -1 : best);

        out.close();
    }

    static int f (double time, Point[] a) {
        boolean lowerTime = false, raiseTime = false;
        int n = a.length;

        for(int i = 0; i < n; i++) {
            double x1 = a[i].x, y1 = a[i].y;
            double x2 = a[i].x + a[i].vx * time, y2 = a[i].y + a[i].vy * time;

            Line l = new Line(x1, y1, x2, y2);
            if(!contains(x2, y2)) {
                //not in the rectangle. If it has already intersected, we need to lower the time

                if(intersects(l)) {
                    lowerTime = true;
                }

                //if it hasn't hit the rectangle yet, we need to raise the time
                if(!intersects(l)) {
                    raiseTime = true;
                }
            } else {
            }
        }

        //-1 if it's impossible
        //1 to raise
        //0 to lower
        //2 for working

        if(raiseTime && lowerTime) return -1;
        if(raiseTime && !lowerTime) return 1;
        if(!raiseTime && lowerTime) return 0;
        return 2;

    }

    static Rectangle rect;

    static boolean intersects (Line l) {
        //bottom part of the rectangle
        Line one = new Line(rect.getX(), rect.getY() - rect.getHeight(),
                rect.getX() + rect.getWidth(), rect.getY() - rect.getHeight());

        //top part of the rectangle
        Line two = new Line(rect.getX(), rect.getY(),
                rect.getX() + rect.getWidth(), rect.getY());

        //right part of the rectangle
        Line three = new Line(rect.getX() + rect.getWidth(), rect.getY() - rect.getHeight(),
                rect.getX() + rect.getWidth(), rect.getY());

        Line four = new Line(rect.getX(), rect.getY() - rect.getHeight(),
                rect.getX(), rect.getY());

        return l.intersectsLine(one.x1, one.y1, one.x2, one.y2) ||
                l.intersectsLine(two.x1, two.y1, two.x2, two.y2) ||
                l.intersectsLine(three.x1, three.y1, three.x2, three.y2) ||
                l.intersectsLine(four.x1, four.y1, four.x2, four.y2);
    }

    static boolean contains (double x, double y) {
        double left = rect.getX(), right = left + rect.getWidth();
        double up = rect.getY(), down = up - rect.getHeight();

        return (x - left > 1e-7 && right - x > 1e-7 &&
                y - down > 1e-7 && up - y > 1e-7);
    }

    static class Point {
        double x, y;
        double vx, vy;
        Point (double a, double b, double c, double d) {
            x = (int)a;
            y = (int)b;
            vx = (int)c;
            vy = (int)d;
        }
    }

    static class Line extends Line2D {
        double x1, y1, x2, y2;
        public double getX1() {return x1;}
        public double getY1() {return y1;}
        public double getX2() {return x2;}
        public double getY2() {return y2;}
        public Point2D getP1() {return null;}
        public Point2D getP2() {return null;}
        public Rectangle2D getBounds2D() {return null;}
        public String toString() {return x1 + " " + y1 + " " + x2 + " " + y2;}
        public void setLine(double x1, double y1, double x2, double y2) {
            this.x1 = x1;
            this.y1 = y1;
            this.x2 = x2;
            this.y2 = y2;
        }
        Line (double a, double b, double c, double d) {setLine(a, b, c, d);}
    }

    static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner() {
            try	{
                br = new BufferedReader(new InputStreamReader(System.in));
                st = new StringTokenizer("");
            } catch (Exception e){e.printStackTrace();}
        }

        public String next() {
            if (st.hasMoreTokens())	return st.nextToken();
            try {st = new StringTokenizer(br.readLine());}
            catch (Exception e) {e.printStackTrace();}
            return st.nextToken();
        }

        public int nextInt() {return Integer.parseInt(next());}

        public long nextLong() {return Long.parseLong(next());}

        public double nextDouble() {return Double.parseDouble(next());}

        public String nextLine() {
            String line = "";
            try {line = br.readLine();}
            catch (Exception e) {e.printStackTrace();}
            return line;
        }

        public Integer[] nextIntegerArray(int n) {
            Integer[] a = new Integer[n];
            for(int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = nextInt();
            return a;
        }

        public char[] nextCharArray() {
            return nextLine().toCharArray();
        }
    }
}