Problem: Qwerty the Ranger arrived to the Diatar system with a very important task. He should deliver a special carcinogen for scientific research to planet Persephone. This is urgent, so Qwerty has to get to the planet as soon as possible. A lost day may fail negotiations as nobody is going to pay for an overdue carcinogen.

You can consider Qwerty's ship, the planet Persephone and the star Diatar points on a plane. Diatar is located in the origin of coordinate axes — at point (0, 0). Persephone goes round Diatar along a circular orbit with radius R in the counter-clockwise direction at constant linear speed vp (thus, for instance, a full circle around the star takes <image> of time). At the initial moment of time Persephone is located at point (xp, yp).

At the initial moment of time Qwerty's ship is at point (x, y). Qwerty can move in any direction at speed of at most v (v > vp). The star Diatar is hot (as all stars), so Qwerty can't get too close to it. The ship's metal sheathing melts at distance r (r < R) from the star.

Find the minimum time Qwerty needs to get the carcinogen to planet Persephone.

Input

The first line contains space-separated integers xp, yp and vp ( - 104 ≤ xp, yp ≤ 104, 1 ≤ vp < 104) — Persephone's initial position and the speed at which it goes round Diatar.

The second line contains space-separated integers x, y, v and r ( - 104 ≤ x, y ≤ 104, 1 < v ≤ 104, 1 ≤ r ≤ 104) — The intial position of Qwerty's ship, its maximum speed and the minimum safe distance to star Diatar.

It is guaranteed that r2 < x2 + y2, r2 < xp2 + yp2 and vp < v.

Output

Print a single real number — the minimum possible delivery time. The answer will be considered valid if its absolute or relative error does not exceed 10 - 6.

Examples

Input

10 0 1
-10 0 2 8


Output

9.584544103

Input

50 60 10
50 60 20 40


Output

0.000000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
static const double PI = 4.0 * atan(1.0);
static const double PI2 = 8.0 * atan(1.0);
template <class T>
T MIN(const T &a, const T &b) {
  return a < b ? a : b;
}
template <class T>
T MAX(const T &a, const T &b) {
  return a > b ? a : b;
}
template <class T>
void MIN_UPDATE(T &a, const T &b) {
  if (a > b) a = b;
}
template <class T>
void MAX_UPDATE(T &a, const T &b) {
  if (a < b) a = b;
}
namespace std {
bool operator<(const complex<double> &a, const complex<double> &b) {
  return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
}
}  // namespace std
double cross(const complex<double> &a, const complex<double> &b) {
  return imag(conj(a) * b);
}
double dot(const complex<double> &a, const complex<double> &b) {
  return real(conj(a) * b);
}
struct L : public vector<complex<double> > {
  L(const complex<double> &a, const complex<double> &b) {
    push_back(a);
    push_back(b);
  }
};
struct C {
  complex<double> p;
  double r;
  C(const complex<double> &p, double r) : p(p), r(r) {}
};
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > 0) return +1;
  if (cross(b, c) < 0) return -1;
  if (dot(b, c) < 0) return +2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
bool intersectLL(const L &l, const L &m) {
  return abs(cross(l[1] - l[0], m[1] - m[0])) > EPS ||
         abs(cross(l[1] - l[0], m[0] - l[0])) < EPS;
}
bool intersectLS(const L &l, const L &s) {
  return cross(l[1] - l[0], s[0] - l[0]) * cross(l[1] - l[0], s[1] - l[0]) <
         EPS;
}
bool intersectLP(const L &l, const complex<double> &p) {
  return abs(cross(l[1] - p, l[0] - p)) < EPS;
}
bool intersectSS(const L &s, const L &t) {
  return ccw(s[0], s[1], t[0]) * ccw(s[0], s[1], t[1]) <= 0 &&
         ccw(t[0], t[1], s[0]) * ccw(t[0], t[1], s[1]) <= 0;
}
bool intersectSP(const L &s, const complex<double> &p) {
  return abs(s[0] - p) + abs(s[1] - p) - abs(s[1] - s[0]) < EPS;
}
complex<double> projection(const L &l, const complex<double> &p) {
  double t = dot(p - l[0], l[0] - l[1]) / norm(l[0] - l[1]);
  return l[0] + t * (l[0] - l[1]);
}
complex<double> reflection(const L &l, const complex<double> &p) {
  return p + 2.0 * (projection(l, p) - p);
}
double distanceLP(const L &l, const complex<double> &p) {
  return abs(p - projection(l, p));
}
double distanceLL(const L &l, const L &m) {
  return intersectLL(l, m) ? 0 : distanceLP(l, m[0]);
}
double distanceLS(const L &l, const L &s) {
  if (intersectLS(l, s)) return 0;
  return min(distanceLP(l, s[0]), distanceLP(l, s[1]));
}
double distanceSP(const L &s, const complex<double> &p) {
  const complex<double> r = projection(s, p);
  if (intersectSP(s, r)) return abs(r - p);
  return min(abs(s[0] - p), abs(s[1] - p));
}
double distanceSS(const L &s, const L &t) {
  if (intersectSS(s, t)) return 0;
  return min(min(distanceSP(s, t[0]), distanceSP(s, t[1])),
             min(distanceSP(t, s[0]), distanceSP(t, s[1])));
}
complex<double> crosspoint(const L &l, const L &m) {
  double A = cross(l[1] - l[0], m[1] - m[0]);
  double B = cross(l[1] - l[0], l[1] - m[0]);
  if (abs(A) < EPS && abs(B) < EPS) return m[0];
  if (abs(A) < EPS) assert(false);
  return m[0] + B / A * (m[1] - m[0]);
}
void tangency(double x0, double y0, double x1, double y1, double r,
              complex<double> out[2]) {
  const double alpha = atan2(y1 - y0, x1 - x0);
  const double L = hypot(x1 - x0, y1 - y0);
  const double theta = asin(r / L);
  const double M = sqrt(L * L - r * r);
  out[0] =
      complex<double>(x0 + M * cos(alpha + theta), y0 + M * sin(alpha + theta));
  out[1] =
      complex<double>(x0 + M * cos(alpha - theta), y0 + M * sin(alpha - theta));
}
double arc(complex<double> p, complex<double> q) {
  double a = abs(p - q);
  double b = abs(p);
  double c = abs(q);
  double cosa = (b * b + c * c - a * a) / (2 * b * c);
  double theta = acos(MAX(-1.0, MIN(1.0, cosa)));
  return theta * b;
}
double time(complex<double> src, double v, double r, complex<double> dst) {
  L direct(src, dst);
  double distFromO = distanceSP(direct, complex<double>(0, 0));
  if (distFromO >= r) {
    return abs(src - dst) / v;
  }
  complex<double> srcToO[2];
  tangency(src.real(), src.imag(), 0, 0, r, srcToO);
  complex<double> oToDst[2];
  tangency(dst.real(), dst.imag(), 0, 0, r, oToDst);
  double minDistance = 1e10;
  for (int i = 0; i < (int)2; ++i)
    for (int j = 0; j < (int)2; ++j) {
      complex<double> a = srcToO[i];
      complex<double> b = oToDst[j];
      MIN_UPDATE(minDistance, abs(src - a) + arc(a, b) + abs(b - dst));
    }
  return minDistance / v;
}
int main() {
  std::ios::sync_with_stdio(false);
  double xp, yp, vp, x, y, v, r;
  cin >> xp >> yp >> vp >> x >> y >> v >> r;
  double R = hypot(xp, yp);
  complex<double> a(x, y);
  complex<double> b(xp, yp);
  double left = 0;
  double right = 1e10;
  for (int loop = 0; loop < (int)200; ++loop) {
    double middle = (left + right) * 0.5;
    double theta = arg(b);
    theta += middle * vp / R;
    complex<double> p = polar(R, theta);
    if (time(a, v, r, p) < middle) {
      right = middle;
    } else {
      left = middle;
    }
  }
  printf("%.20f\n", left);
}