#include <iostream>
#include <iomanip>
#include <cstdlib>
#define FACT 1000
#define STEP 150
using namespace std;

static struct {
	long long x, y, a, b, aa, bb, limit;

	void read() {
		cin>>x>>y>>a>>b;
		x*=FACT, y*=FACT;
		limit = a * a * b * b * FACT * FACT;
	}

	bool inside(long long px, long long py) {
		return (px - x) * (px - x) * b * b + (py - y) * (py - y) * a * a <= limit;
	}
}e1, e2, e3;

bool inside(int i, int j){
	return e1.inside(i, j) || e2.inside(i, j) || e3.inside(i, j);
}

int main() {
	//freopen("input.txt","r",stdin);
	e1.read(); e2.read(); e3.read();
	long long bune=0;
	for(int i = -75 * FACT; i < 75 * FACT; i++){
		int j = -75 * FACT;
		bool last = 0;
		for(; j < 75 * FACT; j+=STEP){
			bool cur = inside(i, j);
			if(cur != last)
				for(int k = 0; k < STEP; k++)
					bune += inside(i, j-k);
			else if(cur)
				bune += STEP;
			last = cur;
		}
	}
	cout << fixed << setprecision(6) << 1.0 * bune / FACT / FACT;
}