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;
double xp, yp, vp;
double x, y, v;
double r;
double best = 1e200;
const double PI = 3.1415926535897932384626433832795;
double circleTime;
double YrPr(double x1, double y1, double x2, double y2, double x, double y) {
  return (y - y1) * (x2 - x1) - (y2 - y1) * (x - x1);
}
double macos(double angle) {
  if (angle > 1) angle -= 1;
  if (angle < -1) angle += 1;
  return acos(angle);
}
double angle(double x1, double y1, double x2, double y2) {
  return macos((x1 * x2 + y1 * y2) / r / r);
}
std::vector<double> ccc(double xx, double yy) {
  double len = sqrt(xx * xx + yy * yy - r * r);
  double angle = atan(len / r);
  double x1 = cos(angle) * xx - sin(angle) * yy;
  double y1 = sin(angle) * xx + cos(angle) * yy;
  double x2 = cos(-angle) * xx - sin(-angle) * yy;
  double y2 = sin(-angle) * xx + cos(-angle) * yy;
  double coeff = r / sqrt(xx * xx + yy * yy);
  x1 *= coeff;
  y1 *= coeff;
  x2 *= coeff;
  y2 *= coeff;
  std::vector<double> ret;
  ret.push_back(x1);
  ret.push_back(y1);
  ret.push_back(x2);
  ret.push_back(y2);
  return ret;
}
double mytime(double rad) {
  double gx = cos(rad) * xp - sin(rad) * yp;
  double gy = sin(rad) * xp + cos(rad) * yp;
  double distStraight = sqrt((gx - x) * (gx - x) + (gy - y) * (gy - y));
  std::vector<double> c1 = ccc(gx, gy);
  std::vector<double> c2 = ccc(x, y);
  if (YrPr(x, y, c2[0], c2[1], gx, gy) * YrPr(x, y, c2[2], c2[3], gx, gy) >=
          0 ||
      (x - gx) * x + (y - gy) * y < 0 ||
      (x - gx) * (x - gx) + (y - gy) * (y - gy) <
          (x - c2[0]) * (x - c2[0]) + (y - c2[1]) * (y - c2[1]))
    return distStraight / v;
  double mn = 1e200;
  for (int i = 0; i < 4; i += 2) {
    for (int u = 0; u < 4; u += 2) {
      mn = min(mn, r * angle(c2[u], c2[u + 1], c1[i], c1[i + 1]));
    }
  }
  double len1 = sqrt(x * x + y * y - r * r);
  double len2 = sqrt(xp * xp + yp * yp - r * r);
  return (mn + len1 + len2) / v;
}
double dist(long long circleNumber, double rad) {
  double tmStar = circleTime * rad / (2 * PI) + circleNumber * circleTime;
  double tmMe = mytime(rad);
  return fabs(tmMe - tmStar);
}
double omd;
double lastmd;
double dist(long long circleNumber, bool first = true) {
  double mn = 0;
  double mx = PI;
  if (!first) {
    mn = PI;
    mx = 2 * PI;
  }
  for (int i = 0; i < 222; i++) {
    double mdb = mn + (mx - mn) / 3;
    double mde = mn + (mx - mn) * 2 / 3;
    double a = dist(circleNumber, mdb);
    double b = dist(circleNumber, mde);
    if (a > b)
      mn = mdb;
    else
      mx = mde;
  }
  double md = (mn + mx) * 0.5;
  if (!first) omd = md;
  if (first) {
    double a = dist(circleNumber, md);
    double b = dist(circleNumber, false);
    if (a < b) {
      lastmd = md;
    } else {
      lastmd = omd;
    }
    return min(a, b);
  }
  return dist(circleNumber, md);
}
int main() {
  cin >> xp >> yp >> vp;
  cin >> x >> y >> v;
  cin >> r;
  circleTime = 2 * PI * sqrt(xp * xp + yp * yp) / vp;
  long long mn = 0;
  long long mx = 111111111111111112ll;
  for (int i = 0; i < 222; i++) {
    long long mdb = mn + (mx - mn) / 3;
    long long mde = mn + (mx - mn) * 2 / 3;
    double a = dist(mdb);
    if (fabs(a) < 2e-8) {
      best = min(best, circleTime * mdb + lastmd / (2 * PI) * circleTime);
    }
    double b = dist(mde);
    if (fabs(b) < 2e-8) {
      best = min(best, circleTime * mde + lastmd / (2 * PI) * circleTime);
    }
    if (fabs(a - b) < 2e-8) {
      mx = mde;
    } else {
      if (a > b)
        mn = mdb;
      else
        mx = mde;
    }
  }
  cout << fixed << setprecision(9) << best << endl;
  return 0;
}