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;
const double eps = 1e-10;
const double PI = acos(-1.0);
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  P operator-(const P& p) const { return P(x - p.x, y - p.y); }
  P operator+(const P& p) const { return P(x + p.x, y + p.y); }
  double operator*(const P& p) const { return x * p.y - y * p.x; }
  double operator&(const P& p) const { return x * p.x + y * p.y; }
  double getA() const { return atan2(y, x); }
  P operator*(const double& d) const { return P(x * d, y * d); }
  P rot(const double& d) const {
    return P(x * cos(d) - y * sin(d), x * sin(d) + y * cos(d));
  }
  bool operator==(const P& p) const {
    return sgn(x - p.x) == 0 && sgn(y - p.y) == 0;
  }
  void init() { scanf("%lf%lf", &x, &y); }
  double norm() const { return hypot(x, y); }
} p, o;
double vp, v, r;
bool ins(const P& u, const P& v) {
  double A = (v - u) & (v - u);
  double B = 2.0 * ((v - u) & u);
  double C = (u & u) - r * r;
  double D = B * B - 4.0 * A * C;
  if (sgn(D) < 0) return false;
  D = sqrt(fabs(D));
  double lhs = (-B + D) / (2 * A);
  double rhs = (-B - D) / (2 * A);
  return sgn(lhs) > 0 && sgn(lhs - 1) < 0 && sgn(rhs) > 0 && sgn(rhs - 1) < 0 &&
         sgn(lhs - rhs);
}
void getP(const P& p, P* ret) {
  double d = p.norm();
  double beta = asin(r / d);
  double dr = sqrt(fabs(d * d - r * r));
  ret[0] = p + (P(0.0, 0.0) - p).rot(beta) * (dr / d);
  ret[1] = p + (P(0.0, 0.0) - p).rot(-beta) * (dr / d);
}
double getT(const P& p, const P& A, const P& B) {
  double h = fabs((p - A) * (B - A)) / (B - A).norm();
  double d = (p - A).norm();
  return sqrt(fabs(d * d - h * h));
}
double sol(double t) {
  double R = p.norm();
  double alpha = t / (R / vp);
  P lhs = o;
  P rhs = p.rot(alpha);
  if (ins(lhs, rhs)) {
    P pA[2], pB[2];
    getP(lhs, pA);
    getP(rhs, pB);
    double ret = 1e100;
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        double alpha = fabs(pA[i].getA() - pB[j].getA());
        ret = min(ret, (lhs - pA[i]).norm() + (rhs - pB[j]).norm() +
                           min(alpha, 2 * PI - alpha) * r);
      }
    }
    return ret / v;
  } else {
    return (lhs - rhs).norm() / v;
  }
}
int main() {
  double L = 0.0, R = 1e10, mid;
  p.init();
  scanf("%lf", &vp);
  o.init();
  scanf("%lf%lf", &v, &r);
  if (p == o) {
    printf("%.10f\n", 0.0);
    return 0;
  }
  for (int i = 0; i < 200; i++) {
    mid = (L + R) / 2.0;
    if (sgn(sol(mid) - mid) <= 0)
      R = mid;
    else
      L = mid;
  }
  printf("%.10f\n", R);
  return 0;
}