using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;

class Iroha
{
    public Iroha() { }
    public static int Main()
    {
        new Iroha().calc();
        return 0;
    }

    Scanner cin;

    P[] R, B;
    P c1, c2;
    P[,][] tanR, tanB;
    int N;
    double r1, r2;

    double MAX = 1e8;

    void calc()
    {
        cin = new Scanner();
        N = cin.nextInt();
        c1 = new P(cin.nextDouble(), cin.nextDouble());
        r1 = cin.nextDouble();
        c2 = new P(cin.nextDouble(), cin.nextDouble());
        r2 = cin.nextDouble();

        R = new P[N];
        B = new P[N];
        for (int i = 0; i < N; i++)
        {
            R[i] = new P(cin.nextDouble(), cin.nextDouble());
        }
        for (int i = 0; i < N; i++)
        {
            B[i] = new P(cin.nextDouble(), cin.nextDouble());
        }

        tanR = new P[N, 2][];
        tanB = new P[N, 2][];
        for (int i = 0; i < N; i++)
        {
            tanR[i, 0] = P.tanCP(c1, r1, R[i]);
            tanR[i, 1] = P.tanCP(c2, r2, R[i]);
            tanB[i, 0] = P.tanCP(c1, r1, B[i]);
            tanB[i, 1] = P.tanCP(c2, r2, B[i]);
            if (R[i].sub(c1).abs() < r1 + 1e-8) tanR[i, 0] = new P[] { R[i].add(R[i].sub(c1).rot90()) };
            if (R[i].sub(c2).abs() < r2 + 1e-8) tanR[i, 1] = new P[] { R[i].add(R[i].sub(c2).rot90()) };
            if (B[i].sub(c1).abs() < r1 + 1e-8) tanB[i, 0] = new P[] { B[i].add(B[i].sub(c1).rot90()) };
            if (B[i].sub(c2).abs() < r2 + 1e-8) tanB[i, 1] = new P[] { B[i].add(B[i].sub(c2).rot90()) };
        }

        double[,] dis = new double[N, N];

        for (int i = 0; i < N; i++)
        {
            for (int j = 0; j < N; j++)
            {
                double dist = MAX;
                if (check2(R[i], B[j]))
                {
                    dist = R[i].sub(B[j]).abs();
                }
                else
                {
                    for (int k = 0; k < 2; k++)
                    {
                        for (int l = 0; l < 2; l++)
                        {
                            foreach (var tr in tanR[i, k])
                            {
                                foreach (var tb in tanB[j, l])
                                {
                                    dist = Math.Min(dist, check(R[i], tr, B[j], tb));
                                }
                            }
                        }
                    }
                }
                //Console.WriteLine(i + " " + j + " " + dist);
                dis[i, j] = MAX - dist;
            }
        }

        double D = hungarian(dis);
        double ans = (MAX * N) - D;
        if (ans >= MAX - 1e-6) Console.WriteLine("Impossible");
        else Console.WriteLine("{0:0.000000000000000}", ans);
    }


    double hungarian(double[,] a)
    {
        int n = a.GetLength(0);
        long p, q;
        double[] fx = new double[n];
        double[] fy = new double[n];
        double inf = MAX;
        long i, j, k;
        for (i = 0; i < n; i++) fx[i] = inf;
        for (i = 0; i < n; i++) fy[i] = inf;
        long[] x = new long[n];
        long[] y = new long[n];
        for (i = 0; i < n; i++) x[i] = y[i] = -1;

        for (i = 0; i < n; ++i)
            for (j = 0; j < n; ++j)
                fx[i] = Math.Max(fx[i], a[i, j]);

        for (i = 0; i < n;)
        {
            long[] t = new long[n];
            long[] s = new long[n + 1];
            for (j = 0; j < n; j++) t[j] = -1;
            for (j = 0; j <= n; j++) s[j] = i;
            for (p = q = 0; p <= q && x[i] < 0; ++p)
                for (k = s[p], j = 0; j < n && x[i] < 0; ++j)
                    if (Math.Abs((fx[k] + fy[j]) - a[k, j]) < 1e-9 && t[j] < 0)
                    {
                        s[++q] = y[j];
                        t[j] = k;
                        if (s[q] < 0)
                            for (p = j; p >= 0; j = p)
                            {
                                y[j] = k = t[j];
                                p = x[k];
                                x[k] = j;
                            }
                    }
            if (x[i] < 0)
            {
                double d = inf;
                for (k = 0; k <= q; ++k)
                    for (j = 0; j < n; ++j)
                        if (t[j] < 0) d = Math.Min(d, fx[s[k]] + fy[j] - a[s[k], j]);
                for (j = 0; j < n; ++j)
                {
                    if (t[j] >= 0) fy[j] += d;
                }
                for (k = 0; k <= q; ++k) fx[s[k]] -= d;
            }
            else ++i;
        }
        double ret = 0;
        for (i = 0; i < n; ++i) ret += a[i, x[i]];
        return ret;
    }

    double check(P a, P ta, P b, P tb)
    {
        P tp = P.isLL(a, ta, b, tb);
        if (tp == null) return MAX;
        if (!check2(a, tp) || !check2(b, tp)) return MAX;
        else return a.sub(tp).abs() + b.sub(tp).abs();
    }

    bool check2(P a, P b)
    {
        if (P.disSP(a, b, c1) < r1 - 1e-12) return false;
        if (P.disSP(a, b, c2) < r2 - 1e-12) return false;
        return true;
    }

}


class P
{
    double x, y;

    public P(double x, double y)
    {
        this.x = x;
        this.y = y;
    }

    public P add(P p)
    {
        return new P(x + p.x, y + p.y);
    }

    public P sub(P p)
    {
        return new P(x - p.x, y - p.y);
    }

    public P mul(double m)
    {
        return new P(x * m, y * m);
    }

    public P div(double d)
    {
        return new P(x / d, y / d);
    }

    public double abs()
    {
        return Math.Sqrt(abs2());
    }

    public double abs2()
    {
        return x * x + y * y;
    }

    public double arg()
    {
        return Math.Atan2(y, x);
    }

    public double dot(P p)
    {
        return x * p.x + y * p.y;
    }

    public double det(P p)
    {
        return x * p.y - y * p.x;
    }

    public double ang(P p)
    {
        return Math.Atan2(det(p), dot(p));
    }

    public P rot90()
    {
        return new P(y, -x);
    }

    public P rot(double d)
    {
        return new P(Math.Cos(d) * x - Math.Sin(d) * y, Math.Sin(d) * x + Math.Cos(d) * y);
    }

    public String toString()
    {
        return "(" + x + "," + y + ")";
    }

    static public double rad(P u, P v)
    {
        double rad = Math.Atan2(u.det(v), u.dot(v));
        if (rad < -EPS) rad += 2 * Math.PI;
        return rad;
    }


    static public double EPS = 1e-9;

    //????????¨???????????¢
    static public double disSP(P p1, P p2, P q)
    {
        if (p2.sub(p1).dot(q.sub(p1)) < EPS) return q.sub(p1).abs();
        if (p1.sub(p2).dot(q.sub(p2)) < EPS) return q.sub(p2).abs();
        return disLP(p1, p2, q);
    }

    //??´?????¨???????????¢
    static double disLP(P p1, P p2, P q)
    {
        return Math.Abs(p2.sub(p1).det(q.sub(p1))) / p2.sub(p1).abs();
    }

    //??´?????¨??´????????????
    static public P isLL(P p1, P p2, P q1, P q2)
    {
        double d = q2.sub(q1).det(p2.sub(p1));
        if (Math.Abs(d) < EPS) return null;
        return p1.add(p2.sub(p1).mul(q2.sub(q1).det(q1.sub(p1)) / d));
    }

    //???p ????????????????????\????????\???
    static public P[] tanCP(P c, double r, P p)
    {
        double x = p.sub(c).abs2();
        double d = x - r * r;
        if (d < -EPS) return new P[0];
        if (d < 0) d = 0;
        P q1 = p.sub(c).mul(r * r / x);
        P q2 = p.sub(c).mul(-r * Math.Sqrt(d) / x).rot90();
        return new P[] { c.add(q1.sub(q2)), c.add(q1.add(q2)) };
    }
}


class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return next();
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }

}



Measured memory_bytes: 24248