#include<iostream>
#include<complex>
#include<vector>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define EPS 1e-10

#define RIGHT 1
#define LEFT  -1

typedef complex<double> P;

double cross(P a,P b){
  return a.real()*b.imag()-a.imag()*b.real();
}

P intersection_ll(P a1,P a2,P b1,P b2){
  P a=a2-a1,b=b2-b1;
  return a1 + a*cross(b,b1-a1)/cross(b,a);
}



int ccw(P a,P b){
  if (cross(a,b)<0 )return RIGHT;
  else if ( cross(a,b)>0)return LEFT;
  return 2;
}

//ただし辺が直線に含まれる場合、端点が直線上にある場合は対処が必要。
//辺を平行移動させるときは９０度回転させて
vector<P> Convex_Cut(const vector<P> & in, int n, const P & a1,const P & a2){
  vector<P> ret;
  rep(i,n){
    P now = in[i],next=in[(i+1)%n];
    if ( ccw(a1-a2,now-a2)==RIGHT)ret.push_back(now);
    if ( ccw(a1-a2,now-a2)*ccw(a1-a2,next-a2)< 0 )
      ret.push_back( intersection_ll(a1,a2,now,next));
  }
  
  return ret;
}

const double eps = 1e-10;
const double pi = acos(-1);

double Polygon_Area(const vector<P> & a,int n){
  double sum = 0;
  for(int i=0;i<n;i++){
    sum += (a[i%n].real()-a[(i+1)%n].real())*(a[i%n].imag()+a[(i+1)%n].imag());
  }
  return (double)(sum/2.0);
}

void dump(string memo, const vector<P> & all){
  cout << "debug " << memo << endl;
  for(size_t i = 0;i < all.size();i++){
    cout<< all[i].real() <<" " << all[i].imag() << endl;
  }
}

double solve(double sum_all, double sum_donut,
	     const vector<P> & all,
	     const vector<P> & donut){
  double beg = 0, end = pi/2;
  for(int i = 0;i < 1000;i++){
    double mid = (beg + end) / 2;
    //vector<P> Convex_Cut(const vector<P> & in, int n, const & P a1,const P & a2);
    P a1(0, 0);
    P a2(cos(mid), sin(mid));

    vector<P> right_a = Convex_Cut(all, all.size(), a1, a2);
    vector<P> right_d = Convex_Cut(donut, donut.size(), a1, a2);

    double right_area_a = Polygon_Area(right_a, right_a.size());
    double right_area_d = Polygon_Area(right_d, right_d.size());

    double left_area_a = sum_all   - right_area_a;
    double left_area_d = sum_donut - right_area_d;

    //dump("right all", right_a);
    //dump("right donut", right_d);

    double sum_right = right_area_a - right_area_d;
    double sum_left  = left_area_a  - left_area_d;
    
    //cout << mid << " " << sin(mid) / cos(mid) << " right " << right_area_a <<" " << right_area_d <<" " <<sum_right << " left "
    //<< left_area_a <<" " << left_area_d <<" " << sum_left << endl;
    if (sum_right > sum_left){// too small
      end = mid;
    } else {
      beg = mid;
    }
  }
  return beg;
}

bool check(double sum_all, double sum_donut,
	   const vector<P> & all,
	   const vector<P> & donut, const P & a2){
  
  P a1(0, 0);

  vector<P> right_a = Convex_Cut(all  , all.size()  , a1, a2);
  vector<P> right_d = Convex_Cut(donut, donut.size(), a1, a2);
  double right_area_a = Polygon_Area(right_a, right_a.size());
  double right_area_d = Polygon_Area(right_d, right_d.size());
  double left_area_a = sum_all   - right_area_a;
  double left_area_d = sum_donut - right_area_d;
  dump("right all", right_a);
  dump("right donut", right_d);

  double sum_right = right_area_a - right_area_d;
  double sum_left  = left_area_a  - left_area_d;
  //cout << "sum all " << sum_all <<" sum_donut " << sum_donut << endl;
  //cout << sum_right << " " << sum_left << endl;
  return false;
} 

int main(){
  double W, H, w, h, x, y;
  cin >> W >> H >> w >> h >> x >> y;
  
  /*
  double solve(double sum_all, double sum_donut,
	     const vector<P> & all,
	     const vector<P> & donut){
  */
  vector<P> all = {P(-W/2, -H/2), P(W/2, -H/2), P(W/2, H/2), P(-W/2, H/2)};
  double area_all = Polygon_Area(all, all.size());
  
  double minx = max(-W/2, x-w/2);
  double maxx = min( W/2, x+w/2);

  double miny = max(-H/2, y-h/2);
  double maxy = min( H/2, y+h/2);

  vector<P> donut = {P(minx, miny ), P(maxx, miny), P(maxx, maxy), P(minx, maxy)};
  double donut_area = Polygon_Area(donut, donut.size());
  //cout << minx <<" " << miny <<" " << maxx <<" " << maxy << endl;
  //cout << donut_area << endl;

  double angle = solve(area_all, donut_area, all, donut);
  
  /*
  cout <<"hogehoge" << endl;
  cout << 180 * angle / pi << endl;
  cout << cos(angle) <<" " << sin(angle) << endl;
  */
  printf("%.8lf\n", sin(angle) / cos(angle));

  /*
    bool check(double sum_all, double sum_donut,
    const vector<P> & all,
    const vector<P> & donut, const P & a2){
  */
  //P a2(cos(angle), sin(angle));
  //check(area_all, donut_area, all, donut, a2);
  
  /*
 cout <<"check " << endl;
  double tangle = atan(0.75);
  P a3(cos(tangle), sin(tangle));
  cout <<"tangle " << tangle << " rad " << 180 * tangle / pi << " degree " << endl;
  check(area_all, donut_area, all, donut, a3);
  */
  
  return 0;
}



Measured memory_bytes: 3528