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;
struct pt {
  double x, y;
  pt() : x(0), y(0) {}
  pt(double x, double y) : x(x), y(y) {}
  pt operator-(const pt &p2) const { return pt(x - p2.x, y - p2.y); }
  pt operator+(const pt &p2) const { return pt(x + p2.x, y + p2.y); }
  double dist2() const { return x * x + y * y; }
  double dist() const { return sqrt(dist2()); }
};
vector<pt> cross(double r, double a, double b, double c) {
  double d2 = a * a + b * b;
  pt p0(-a * c / d2, -b * c / d2);
  double dcent2 = c * c / d2;
  double len = r * r - dcent2;
  vector<pt> res;
  if (len < 1e-9)
    res.push_back(p0);
  else {
    len = sqrt(len / d2);
    pt step(-b * len, a * len);
    res.push_back(p0 + step);
    res.push_back(p0 - step);
  }
  return res;
}
double r;
vector<pt> getTangent(pt p) {
  double r1 = p.dist2() - r * r;
  if (r1 < 1e-9)
    r1 = 0;
  else
    r1 = sqrt(r1);
  double a = 2 * p.x;
  double b = 2 * p.y;
  double c = -p.x * p.x - p.y * p.y + r1 * r1 - r * r;
  vector<pt> res = cross(r, a, b, c);
  return res;
}
pt p0;
double R0, v0;
double getArc(const pt &p1, const pt &p2) {
  double diff = atan2(p1.y, p1.x) - atan2(p2.y, p2.x);
  while (diff < 0) diff += 2 * M_PI;
  while (diff >= 2 * M_PI + 1e-9) diff -= 2 * M_PI;
  return min(fabs(diff), fabs(2 * M_PI - diff)) * r;
}
bool is_in(double x1, double x, double x2) {
  if (x1 > x2) swap(x1, x2);
  return x1 <= x + 1e-9 && x - 1e-9 <= x2;
}
pt pst;
double vst;
vector<pt> pts1;
bool caught(double t) {
  double cd = 1e100;
  pt pp;
  {
    double tang = t * v0 / R0;
    double tx = cos(tang), ty = sin(tang);
    pp = pt(p0.x * tx - p0.y * ty, p0.x * ty + p0.y * tx);
  }
  {
    double a = pp.y - pst.y;
    double b = pst.x - pp.x;
    double c = -a * pp.x - b * pp.y;
    double d2 = a * a + b * b;
    double d0 = fabs(c) / sqrt(d2);
    pt p(-a * c / d2, -b * c / d2);
    if (!(is_in(pp.x, p.x, pst.x) && is_in(pp.y, p.y, pst.y) &&
          d0 < r - 1e-9)) {
      cd = (pp - pst).dist();
      goto end;
    }
  }
  {
    vector<pt> pts2 = getTangent(pp);
    for (int a = 0; a < ((int)(pts1).size()); a++)
      for (int b = 0; b < ((int)(pts2).size()); b++) {
        double d = 0;
        d += (pts1[a] - pst).dist();
        d += getArc(pts1[a], pts2[b]);
        d += (pts2[b] - pp).dist();
        cd = min(cd, d);
      }
  }
end:;
  return cd <= t * vst + 1e-9;
}
int main() {
  while (scanf("%lf%lf%lf%lf%lf%lf%lf", &p0.x, &p0.y, &v0, &pst.x, &pst.y, &vst,
               &r) >= 1) {
    R0 = p0.dist();
    pts1 = getTangent(pst);
    double L = 0, R = 2e6;
    assert(caught(R));
    if (caught(L)) R = L;
    for (int step = 0; step < 100; step++) {
      double M = (L + R) / 2;
      if (caught(M))
        R = M;
      else
        L = M;
    }
    printf("%.18e\n", R);
  }
  return 0;
}