#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<utility>
#include<map>
#include<complex>
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll INF = mod * mod;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef vector<int> vec;
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define stop char nyaa;cin>>nyaa;
#define per(i,n) for(int i=n-1;i>=0;i--)

//geometry
typedef long double ld;
typedef complex<ld> Point;
const ld pi = acos(-1.0);
const ld eps = 1e-9;

bool eq(ld a, ld b) {
	return abs(a - b) < eps;
}
ld dot(Point a, Point b) { return real(conj(a)*b); }
ld cross(Point a, Point b) { return imag(conj(a)*b); }

struct Line {
	Point a, b;
};
struct Circle {
	Point p; ld r;
};
bool isis_ll(Line l, Line m) {
	return !eq(cross(l.b - l.a, m.b - m.a), 0);
}
bool isis_sp(Line s, Point p) {
	return (abs(s.a - p) + abs(s.b - p) - abs(s.b - s.a) < eps);
}
Point proj(Line l, Point p) {
	ld t = dot(p - l.a, l.a - l.b) / norm(l.a - l.b);
	return l.a + t * (l.a - l.b);
}
ld dist_lp(Line l, Point p) {
	return abs(p - proj(l, p));
}
ld dist_sp(Line s, Point p) {
	Point r = proj(s, p);
	return isis_sp(s, r) ? abs(p - r) : min(abs(p - s.a), abs(p - s.b));
}

Point is_ll(Line s, Line t) {
	Point sv = s.b - s.a;
	Point tv = t.b - t.a;
	return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}

vector<Line> tangent_cp(Circle c, Point p) {
	vector<Line> res;
	Point v = c.p - p;
	ld d = abs(v);
	ld l = sqrt(norm(v) - c.r*c.r);
	if (isnan(l))return res;
	Point v1 = v * Point(l / d, c.r / d);
	Point v2 = v * Point(l / d, -c.r / d);
	res.push_back(Line{ p,p + v1 });
	if (l < eps)return res;
	res.push_back(Line{ p,p + v2 });
	return res;
}

int max_n;
const int mn = 100000;
struct edge {
	int to, cap; ld cost; int rev;
};
typedef pair<ld, int> speP;
vector<edge> G[mn];
int par[mn];
ld dist[mn];
void add_edge(int from, int to, int cap, ld cost) {
	G[from].push_back({ to,cap,cost,(int)G[to].size() });
	G[to].push_back({ from,0,-cost,(int)G[from].size()-1 });
	max_n = max({ max_n,from + 1,to + 1 });
}
ld minimum_road(int s, int t) {
	fill(par, par + max_n, -1);
	fill(dist, dist + max_n, mod);
	dist[s] = 0;
	priority_queue<speP, vector<speP>, greater<speP>> q;
	q.push({ 0,s });
	while (!q.empty()) {
		speP p = q.top(); q.pop();
		int id = p.second;
		if (id == t)continue;
		if (p.first > dist[id])continue;
		rep(j, G[id].size()) {
			if (G[id][j].cap > 0) {
				int to = G[id][j].to;
				ld nd = p.first + G[id][j].cost;
				if (nd < dist[to]) {
					dist[to] = nd;
					par[to] = id;
					q.push({ dist[to],to });
				}
			}
		}
	}
	int cur = t;
	while (cur != s) {
		int p = par[cur];
		if (p < 0)return -1;
		rep(j, G[p].size()) {
			if (G[p][j].cap > 0 && G[p][j].to == cur && dist[p] + G[p][j].cost == dist[cur]) {
				G[p][j].cap--;
				G[cur][G[p][j].rev].cap++;
				break;
			}
		}
		cur = p;
	}
	return dist[t];
}
ld minimum_cost_flow(int s, int t, int k) {
	ld ret = 0;
	rep(i, k) {
		ld z = minimum_road(s, t);
		if (z < 0)return -1;
		ret += z;
	}
	return ret;
}

bool isis_cs(Circle c, Line s) {
	ld dist = dist_sp(s,c.p);
	return dist < c.r - eps;
}

vector<Circle> c;

void solve() {
	int n; cin >> n;
	c.resize(2);
	rep(i, 2) {
		ld x, y, r; cin >> x >> y >> r;
		c[i] = { {x,y},r };
	}
	vector<Point> a(n), b(n);
	rep(i, n) {
		ld x, y; cin >> x >> y;
		a[i] = { x,y };
	}
	rep(i, n) {
		ld x, y; cin >> x >> y;
		b[i] = { x,y };
	}
	int s = 2 * n, t = 2 * n + 1;
	rep(i, n) {
		add_edge(s, i, 1, 0);
		add_edge(i + n,t, 1, 0);
	}
	vector<vector<Line>> l(n), r(n);
	rep(i, n) {
		rep(j, 2) {
			vector<Line> u = tangent_cp(c[j], a[i]);
			rep(k, u.size())l[i].push_back(u[k]);
			u = tangent_cp(c[j], b[i]);
			rep(k, u.size())r[i].push_back(u[k]);
		}
	}
	rep(i, n) {
		rep(j, n) {
			Point le = a[i], ri = b[j];
			ld cost = mod;
			{
				Line l = { le,ri };
				bool f = true;
				rep(k, 2) {
					if (isis_cs(c[k], l))f = false;
				}
				if (f) {
					cost = abs(ri - le);
					add_edge(i, n + j, 1, cost);
					continue;
				}
			}
			rep(k1, l[i].size()) {
				rep(k2,r[j].size()) {
					Line lle = l[i][k1];
					Line rri = r[j][k2];
					if (!isis_ll(lle, rri))continue;
					Point cn = is_ll(lle, rri);
					Line sl = { le,cn };
					Line sr = { ri,cn };
					bool valid = true;
					rep(k, 2) {
						if (isis_cs(c[k], sl) || isis_cs(c[k], sr)) {
							valid = false; break;
						}
					}
					if (valid) {
						cost = min(cost, abs(cn - le) + abs(cn - ri));
					}
				}
			}
			if (cost == mod)continue;
			add_edge(i, n + j, 1, cost);
		}
	}
	ld ans = minimum_cost_flow(s, t, n);
	if (ans == -1) {
		cout << "Impossible" << endl;
	}
	else {
		cout << ans << endl;
	}
}


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(10);
	solve();
	//stop
		return 0;
}


