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-8;
const double PI = atan2(0.0, -1.0);
struct Point {
  double x, y;
};
inline double xmult(const Point& p1, const Point& p2, const Point& p0) {
  return (p1.x - p0.x) * (p2.y - p0.y) - (p2.x - p0.x) * (p1.y - p0.y);
}
inline double dis(const Point& p1, const Point& p2) {
  return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
}
double disptoline(const Point& p, const Point& l1, const Point& l2) {
  return fabs(xmult(p, l1, l2)) / dis(l1, l2);
}
Point intersection(const Point& u1, const Point& u2, const Point& v1,
                   const Point& v2) {
  Point ret = u1;
  double t = ((u1.x - v1.x) * (v1.y - v2.y) - (u1.y - v1.y) * (v1.x - v2.x)) /
             ((u1.x - u2.x) * (v1.y - v2.y) - (u1.y - u2.y) * (v1.x - v2.x));
  ret.x += (u2.x - u1.x) * t;
  ret.y += (u2.y - u1.y) * t;
  return ret;
}
int intersectSegCircle(const Point& c, double r, const Point& l1,
                       const Point& l2) {
  double t1 = dis(c, l1) - r, t2 = dis(c, l2) - r;
  Point t = c;
  if (t1 < EPS || t2 < EPS) {
    return t1 > -EPS || t2 > -EPS;
  }
  t.x += l1.y - l2.y;
  t.y += l2.x - l1.x;
  return xmult(l1, c, t) * xmult(l2, c, t) < EPS &&
         disptoline(c, l1, l2) - r < EPS;
}
void intersectionLineCircle(const Point& c, double r, const Point& l1,
                            const Point& l2, Point& p1, Point& p2) {
  Point p = c;
  p.x += l1.y - l2.y;
  p.y += l2.x - l1.x;
  p = intersection(p, c, l1, l2);
  double t = sqrt(r * r - dis(p, c) * dis(p, c)) / dis(l1, l2);
  p1.x = p.x + (l2.x - l1.x) * t;
  p1.y = p.y + (l2.y - l1.y) * t;
  p2.x = p.x - (l2.x - l1.x) * t;
  p2.y = p.y - (l2.y - l1.y) * t;
}
void intersectionCircleCircle(const Point& c1, double r1, const Point& c2,
                              double r2, Point& p1, Point& p2) {
  Point u, v;
  double t = (1 + (r1 * r1 - r2 * r2) / dis(c1, c2) / dis(c1, c2)) / 2;
  u.x = c1.x + (c2.x - c1.x) * t;
  u.y = c1.y + (c2.y - c1.y) * t;
  v.x = u.x + c1.y - c2.y;
  v.y = u.y - c1.x + c2.x;
  intersectionLineCircle(c1, r1, u, v, p1, p2);
}
Point origin;
Point aim, from;
double vaim, vfrom;
double raim, rlimit;
double vangle, angle0;
double getLenInCircle(const Point& c, double r, const Point& p1,
                      const Point& p2) {
  double angle1 = atan2(p1.y - c.y, p1.x - c.x);
  double angle2 = atan2(p2.y - c.y, p2.x - c.x);
  double diff = abs(angle1 - angle2);
  diff = min(diff, 2 * PI - diff);
  return diff * r;
}
double getCutLen(const Point& c, double r, const Point& p) {
  double cdis = dis(c, p);
  return sqrt(cdis * cdis - r * r);
}
double getMinDis(const Point& c, double r, const Point& l1, const Point& l2) {
  if (abs(disptoline(c, l1, l2) - r) <= EPS) {
    return dis(l1, l2);
  }
  Point inter1[2], inter2[2];
  double len1 = getCutLen(c, r, l1);
  double len2 = getCutLen(c, r, l2);
  intersectionCircleCircle(c, r, l1, len1, inter1[0], inter1[1]);
  intersectionCircleCircle(c, r, l2, len2, inter2[0], inter2[1]);
  double minDis = getLenInCircle(c, r, inter1[0], inter2[0]);
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 2; j++) {
      minDis = min(minDis, getLenInCircle(c, r, inter1[i], inter2[j]));
    }
  }
  return minDis + len1 + len2;
}
bool check(double t) {
  double angle = vangle * t + angle0;
  Point end;
  end.x = raim * cos(angle);
  end.y = raim * sin(angle);
  if (dis(end, from) > vfrom * t) {
    return false;
  }
  if (intersectSegCircle(origin, rlimit, end, from)) {
    double len = getMinDis(origin, rlimit, end, from);
    return (vfrom * t >= len);
  } else {
    return true;
  }
}
int main() {
  origin.x = origin.y = 0.0;
  scanf("%lf%lf%lf", &aim.x, &aim.y, &vaim);
  scanf("%lf%lf%lf%lf", &from.x, &from.y, &vfrom, &rlimit);
  raim = sqrt(aim.x * aim.x + aim.y * aim.y);
  double period = 2 * PI * raim / vaim;
  vangle = 2 * PI / period;
  angle0 = atan2(aim.y, aim.x);
  double left = 0.0;
  double right = dis(aim, from) + period;
  int remain = 200;
  while (remain-- > 0) {
    double middle = (left + right) * 0.5;
    if ((middle - left) <= EPS || (right - middle) <= EPS) {
      break;
    }
    if (check(middle)) {
      right = middle;
    } else {
      left = middle;
    }
  }
  printf("%.8lf\n", right);
  return 0;
}