#include #include #include #include #include #define inf (1<<30) #define maxdim 1000005 using namespace std; const double step = 1e-4; struct elipse{ double cx,cy; double rx,ry; }E[10]; int main () { #ifndef ONLINE_JUDGE freopen("a.in","r",stdin); freopen("a.out","w",stdout); #endif int n = 3; for ( int i = 1 ; i <= n ; ++i ){ scanf("%lf %lf %lf %lf",&E[i].cx,&E[i].cy,&E[i].rx,&E[i].ry); E[i].rx *= E[i].rx; E[i].ry *= E[i].ry; } double area = 0; vector< pair >events; events.reserve(10); for ( double x = -77 ; x <= 77 ; x += step ){ for ( int i = 1 ; i <= n ; ++i ){ double newx = x-E[i].cx; double dif = 1-(newx*newx)/(E[i].rx); if ( dif < 0 ) continue ; double ysquare = E[i].ry*dif; double y1 = sqrt(ysquare); double y2 = -y1; y1 += E[i].cy,y2 += E[i].cy; events.push_back(make_pair(y2,1)); events.push_back(make_pair(y1,-1)); } sort(events.begin(),events.end()); int in = 0; for ( int i = 0 ; i < (int)events.size()-1 ; ++i ){ in += events[i].second; if ( in ){ area += events[i+1].first-events[i].first; } } events.clear(); } area *= step; printf("%.7lf\n",area); return 0; }