#include "bits/stdc++.h"
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define in(x) int (x); input((x));
#define x first
#define y second
typedef int itn;
#define next next12345
#define prev prev12345
#define x1 x12345
#define y1 y12345
using namespace std;
template <typename T>
T gcd(T x, T y) {
while (y > 0) {
x %= y;
swap(x, y);
}
return x;
}
template <class _T> inline _T sqr(const _T& x) {return x * x;}
template <class _T> inline string tostr(const _T& a) {ostringstream os(""); os << a; return os.str();}
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef pair < int, int > PII;
const long double PI = 3.1415926535897932384626433832795L;
template<typename T>
inline void input(T &a) {
static int c;
a = 0;
while (!isdigit(c = getchar()) && c != '-') {}
char neg = 0;
if (c == '-') {
neg = 1;
c = getchar();
}
while (isdigit(c)) {
a = 10 * a + c - '0';
c = getchar();
}
if (neg) a = -a;
}
template <typename T = int>
inline T nxt() {
T res;
input(res);
return res;
}
double a, b, p, q, v1, v2;
double eps = 1e-9;
double get(double x1, double y1, double x2, double y2) {
double a = (v2 * v2 - v1 * v1);
double b = (y1 - y2) * v1;
double c = -(sqr(x1 - x2) + sqr(y1 - y2));
if (fabs(c) < eps) return 0;
if (fabs(a) < eps) {
//cerr << -c / 2 / b << endl;
return -c / 2 / b;
}
double d = b * b - a * c;
if (d < 0) {
return 1e9;
}
double t1 = (-b + sqrt(d)) / a;
return t1;
}
double get2(double qq) {
int it = 200;
double l = qq / v1, r = 1e9;
while (it--) {
double mid = (l + r) / 2;
double t1 = get(p, qq, -a, b) + get(-a, b, -a, 0) + get(-a, 0, p, qq - mid * v1);
double t2 = get(p, qq, a, b) + get(a, b, a, 0) + get(a, 0, p, qq - mid * v1);
double t = min(t1, t2);
if (t < mid) {
r = mid;
} else {
l = mid;
}
}
return l;
}
int main() {
//#define int long
#ifdef LOCAL
freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
#else
#define fname "war"
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
a = nxt();
b = nxt();
p = nxt();
q = nxt();
v1 = nxt();
v2 = nxt();
double L = 0, R = (q - b) / v1;
int it2 = 200;
while (it2--) {
double mid = (L + R) / 2;
if (get2(q - v1 * mid) > 5e8) {
R = mid;
} else {
L = mid;
}
}
double l = 0, r = R;
int it = 200;
while (it--) {
double m1 = (2 * l + r) / 3;
double m2 = (l + 2 * r) / 3;
double vv1 = get2(q - v1 * m1);
double vv2 = get2(q - v1 * m2);
if (vv1 < vv2) {
r = m2;
} else {
l = m1;
}
}
cout << setprecision(10) << fixed;
cout << get2(q - v1 * l) << endl;
#ifdef LOCAL
//cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC * 1000 << " ms." << endl;
#endif
return 0;
}
I2luY2x1ZGUgImJpdHMvc3RkYysrLmgiCgojZGVmaW5lIGNscih4KSBtZW1zZXQoKHgpLCAwLCBzaXplb2YoeCkpCiNkZWZpbmUgYWxsKHgpICh4KS5iZWdpbigpLCAoeCkuZW5kKCkKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSBpbih4KSBpbnQgKHgpOyBpbnB1dCgoeCkpOwojZGVmaW5lIHggZmlyc3QKI2RlZmluZSB5IHNlY29uZAp0eXBlZGVmIGludCBpdG47CgojZGVmaW5lIG5leHQgbmV4dDEyMzQ1CiNkZWZpbmUgcHJldiBwcmV2MTIzNDUKI2RlZmluZSB4MSB4MTIzNDUKI2RlZmluZSB5MSB5MTIzNDUKCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KVCBnY2QoVCB4LCBUIHkpIHsKICAgIHdoaWxlICh5ID4gMCkgewogICAgICAgIHggJT0geTsKICAgICAgICBzd2FwKHgsIHkpOwogICAgfQogICAgcmV0dXJuIHg7Cn0KCnRlbXBsYXRlIDxjbGFzcyBfVD4gaW5saW5lIF9UIHNxcihjb25zdC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25nCiNpZmRlZiBMT0NBTAogICAgZnJlb3BlbigiaW5wdXQudHh0IiwgInIiLCBzdGRpbik7CiAgICAvL2ZyZW9wZW4oIm91dHB1dC50eHQiLCAidyIsIHN0ZG91dCk7CiNlbHNlCiNkZWZpbmUgZm5hbWUgIndhciIKICAgIGZyZW9wZW4oImlucHV0LnR4dCIsICJyIiwgc3RkaW4pOwogICAgZnJlb3Blbigib3V0cHV0LnR4dCIsICJ3Iiwgc3Rkb3V0KTsKI2VuZGlmCgogICAgIGEgPSBueHQoKTsKICAgICBiID0gbnh0KCk7CiAgICAgcCA9IG54dCgpOwogICAgIHEgPSBueHQoKTsKICAgICB2MSA9IG54dCgpOwogICAgIHYyID0gbnh0KCk7CgoKICAgIGRvdWJsZSBMID0gMCwgUiA9IChxIC0gYikgLyB2MTsKCiAgICBpbnQgaXQyID0gMjAwOwoKICAgIHdoaWxlIChpdDItLSkgewogICAgICAgIGRvdWJsZSBtaWQgPSAoTCArIFIpIC8gMjsKICAgICAgICBpZiAoZ2V0MihxIC0gdjEgKiBtaWQpID4gNWU4KSB7CiAgICAgICAgICAgIFIgPSBtaWQ7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgTCA9IG1pZDsKICAgICAgICB9CiAgICB9CiAgICBkb3VibGUgbCA9IDAsIHIgPSBSOwoKICAgIGludCBpdCA9IDIwMDsKICAgIHdoaWxlIChpdC0tKSB7CiAgICAgICAgZG91YmxlIG0xID0gKDIgKiBsICsgcikgLyAzOwogICAgICAgIGRvdWJsZSBtMiA9IChsICsgMiAqIHIpIC8gMzsKICAgICAgICBkb3VibGUgdnYxID0gZ2V0MihxIC0gdjEgKiBtMSk7CiAgICAgICAgZG91YmxlIHZ2MiA9IGdldDIocSAtIHYxICogbTIpOwogICAgICAgIGlmICh2djEgPCB2djIpIHsKICAgICAgICAgICAgciA9IG0yOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGwgPSBtMTsKICAgICAgICB9CiAgICB9CgogICAgY291dCA8PCBzZXRwcmVjaXNpb24oMTApIDw8IGZpeGVkOwogICAgY291dCA8PCBnZXQyKHEgLSB2MSAqIGwpIDw8IGVuZGw7CgoKI2lmZGVmIExPQ0FMCiAgICAvL2NlcnIgPDwgIlRpbWUgZWxhcHNlZDogIiA8PCAxLjAgKiBjbG9jaygpIC8gQ0xPQ0tTX1BFUl9TRUMgKiAxMDAwIDw8ICIgbXMuIiA8PCBlbmRsOwojZW5kaWYKICAgIHJldHVybiAwOwp9