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;
using namespace std;
double INF = 1e100;
double EPS = 1e-12;
struct PT {
  double x, y;
  PT() {}
  PT(double x, double y) : x(x), y(y) {}
  PT(const PT &p) : x(p.x), y(p.y) {}
  PT operator+(const PT &p) const { return PT(x + p.x, y + p.y); }
  PT operator-(const PT &p) const { return PT(x - p.x, y - p.y); }
  PT operator*(double c) const { return PT(x * c, y * c); }
  PT operator/(double c) const { return PT(x / c, y / c); }
  double dist() { return sqrt(x * x + y * y); }
  double dist(const PT &p) {
    double xx = x - p.x;
    double yy = y - p.y;
    return sqrt(xx * xx + yy * yy);
  }
};
double dot(PT p, PT q) { return p.x * q.x + p.y * q.y; }
double dist2(PT p, PT q) { return dot(p - q, p - q); }
double cross(PT p, PT q) { return p.x * q.y - p.y * q.x; }
PT RotateCCW90(PT p) { return PT(-p.y, p.x); }
PT RotateCW90(PT p) { return PT(p.y, -p.x); }
PT RotateCCW(PT p, double t) {
  return PT(p.x * cos(t) - p.y * sin(t), p.x * sin(t) + p.y * cos(t));
}
PT ProjectPointLine(PT a, PT b, PT c) {
  return a + (b - a) * dot(c - a, b - a) / dot(b - a, b - a);
}
PT ProjectPointSegment(PT a, PT b, PT c) {
  double r = dot(b - a, b - a);
  if (fabs(r) < EPS) return a;
  r = dot(c - a, b - a) / r;
  if (r < 0) return a;
  if (r > 1) return b;
  return a + (b - a) * r;
}
double DistancePointSegment(PT a, PT b, PT c) {
  return sqrt(dist2(c, ProjectPointSegment(a, b, c)));
}
double DistancePointPlane(double x, double y, double z, double a, double b,
                          double c, double d) {
  return fabs(a * x + b * y + c * z - d) / sqrt(a * a + b * b + c * c);
}
bool LinesParallel(PT a, PT b, PT c, PT d) {
  return fabs(cross(b - a, c - d)) < EPS;
}
bool LinesCollinear(PT a, PT b, PT c, PT d) {
  return LinesParallel(a, b, c, d) && fabs(cross(a - b, a - c)) < EPS &&
         fabs(cross(c - d, c - a)) < EPS;
}
bool SegmentsIntersect(PT a, PT b, PT c, PT d) {
  if (LinesCollinear(a, b, c, d)) {
    if (dist2(a, c) < EPS || dist2(a, d) < EPS || dist2(b, c) < EPS ||
        dist2(b, d) < EPS)
      return true;
    if (dot(c - a, c - b) > 0 && dot(d - a, d - b) > 0 && dot(c - b, d - b) > 0)
      return false;
    return true;
  }
  if (cross(d - a, b - a) * cross(c - a, b - a) > 0) return false;
  if (cross(a - c, d - c) * cross(b - c, d - c) > 0) return false;
  return true;
}
PT ComputeLineIntersection(PT a, PT b, PT c, PT d) {
  b = b - a;
  d = c - d;
  c = c - a;
  assert(dot(b, b) > EPS && dot(d, d) > EPS);
  return a + b * cross(c, d) / cross(b, d);
}
PT ComputeCircleCenter(PT a, PT b, PT c) {
  b = (a + b) / 2;
  c = (a + c) / 2;
  return ComputeLineIntersection(b, b + RotateCW90(a - b), c,
                                 c + RotateCW90(a - c));
}
bool PointInPolygon(const vector<PT> &p, PT q) {
  bool c = 0;
  for (int i = 0; i < p.size(); i++) {
    int j = (i + 1) % p.size();
    if ((p[i].y <= q.y && q.y < p[j].y || p[j].y <= q.y && q.y < p[i].y) &&
        q.x < p[i].x + (p[j].x - p[i].x) * (q.y - p[i].y) / (p[j].y - p[i].y))
      c = !c;
  }
  return c;
}
bool PointOnPolygon(const vector<PT> &p, PT q) {
  for (int i = 0; i < p.size(); i++)
    if (dist2(ProjectPointSegment(p[i], p[(i + 1) % p.size()], q), q) < EPS)
      return true;
  return false;
}
vector<PT> CircleLineIntersection(PT a, PT b, PT c, double r) {
  vector<PT> ret;
  b = b - a;
  a = a - c;
  double A = dot(b, b);
  double B = dot(a, b);
  double C = dot(a, a) - r * r;
  double D = B * B - A * C;
  if (D < -EPS) return ret;
  ret.push_back(c + a + b * (-B + sqrt(D + EPS)) / A);
  if (D > EPS) ret.push_back(c + a + b * (-B - sqrt(D)) / A);
  return ret;
}
vector<PT> CircleCircleIntersection(PT a, PT b, double r, double R) {
  vector<PT> ret;
  double d = sqrt(dist2(a, b));
  if (d > r + R || d + min(r, R) < max(r, R)) return ret;
  double x = (d * d - R * R + r * r) / (2 * d);
  double y = sqrt(r * r - x * x);
  PT v = (b - a) / d;
  ret.push_back(a + v * x + RotateCCW90(v) * y);
  if (y > 0) ret.push_back(a + v * x - RotateCCW90(v) * y);
  return ret;
}
vector<PT> CircleTangencial(PT a, PT b, double r) {
  PT res;
  double dd = a.dist(b);
  double ang = acos(r / dd);
  double dx = a.x - b.x;
  double dy = a.y - b.y;
  double zz;
  vector<PT> rr;
  res.x = dx * cos(ang) - dy * sin(ang);
  res.y = dx * sin(ang) + dy * cos(ang);
  zz = res.dist();
  res.x = res.x / zz * r;
  res.y = res.y / zz * r;
  res = res + b;
  rr.push_back(res);
  ang = -ang;
  res.x = dx * cos(ang) - dy * sin(ang);
  res.y = dx * sin(ang) + dy * cos(ang);
  zz = res.dist();
  res.x = res.x / zz * r;
  res.y = res.y / zz * r;
  res = res + b;
  rr.push_back(res);
  return rr;
}
double ComputeSignedArea(const vector<PT> &p) {
  double area = 0;
  for (int i = 0; i < p.size(); i++) {
    int j = (i + 1) % p.size();
    area += p[i].x * p[j].y - p[j].x * p[i].y;
  }
  return area / 2.0;
}
double ComputeArea(const vector<PT> &p) { return fabs(ComputeSignedArea(p)); }
PT ComputeCentroid(const vector<PT> &p) {
  PT c(0, 0);
  double scale = 6.0 * ComputeSignedArea(p);
  for (int i = 0; i < p.size(); i++) {
    int j = (i + 1) % p.size();
    c = c + (p[i] + p[j]) * (p[i].x * p[j].y - p[j].x * p[i].y);
  }
  return c / scale;
}
bool IsSimple(const vector<PT> &p) {
  for (int i = 0; i < p.size(); i++) {
    for (int k = i + 1; k < p.size(); k++) {
      int j = (i + 1) % p.size();
      int l = (k + 1) % p.size();
      if (i == l || j == k) continue;
      if (SegmentsIntersect(p[i], p[j], p[k], p[l])) return false;
    }
  }
  return true;
}
PT init_p;
double rp;
PT af_p;
double vp;
PT me_p;
double vm;
double rm;
void input() {
  scanf("%lf %lf %lf", &init_p.x, &init_p.y, &vp);
  scanf("%lf %lf %lf %lf", &me_p.x, &me_p.y, &vm, &rm);
  rp = init_p.dist();
}
bool rou() {
  vector<PT> cr = CircleLineIntersection(me_p, af_p, PT(0, 0), rm);
  if (cr.size() < 2) return false;
  double dx, dy, dd;
  dx = af_p.x - me_p.x;
  dy = af_p.y - me_p.y;
  if (abs(dx) < EPS && abs(dy) < EPS) return false;
  double ddx, ddy, ddd;
  ddx = cr[0].x - me_p.x;
  ddy = cr[0].y - me_p.y;
  double kk;
  if (abs(dx) < EPS) {
    kk = ddy / dy;
  } else {
    kk = ddx / dx;
  }
  if (kk > 0 && kk < 1) return true;
  return false;
}
double get_dist() {
  if (rou()) {
    vector<PT> m_tan, p_tan;
    m_tan = CircleTangencial(me_p, PT(0, 0), rm);
    p_tan = CircleTangencial(af_p, PT(0, 0), rm);
    double d1 = m_tan[0].dist(me_p);
    double d2 = p_tan[0].dist(af_p);
    int i, j;
    double d3 = 99;
    for (i = 0; i < 2; i++)
      for (j = 0; j < 2; j++) {
        PT pp = m_tan[i];
        PT qq = p_tan[j];
        double ang1 = atan2(pp.y, pp.x);
        double ang2 = atan2(qq.y, qq.x);
        double ang = ang1 - ang2;
        double pi = acos(0.0) * 2;
        if (ang < 0) ang += 2 * pi;
        if (ang > pi) ang = 2 * pi - ang;
        d3 = min(d3, ang);
      }
    d3 = d3 * rm;
    return d1 + d2 + d3;
  } else {
    return me_p.dist(af_p);
  }
}
void process() {
  double l, r;
  double mid;
  l = 0;
  r = 100000;
  while (abs(l - r) > 0.00000001) {
    mid = (l + r) / 2;
    double ang = mid * vp / rp;
    af_p.x = init_p.x * cos(ang) - init_p.y * sin(ang);
    af_p.y = init_p.x * sin(ang) + init_p.y * cos(ang);
    double ddd = get_dist();
    if (ddd < mid * vm)
      r = mid;
    else
      l = mid;
  }
  printf("%.9lf\n", l);
}
int main() {
  input();
  process();
}