#include #include #include using namespace std; const double EPS = 1e-10; bool chez(double a){ if(abs(a) < EPS) return true; return false; } int main(){ double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; double t = f - e; if(!chez(c)) t -= c * c /(4 * a); if(!chez(d)) t -= d * d / (4 * b); t /= a; printf("%.10lf\n", sqrt(t)); }