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 x, y, v, r, xp, yp, vp, wp, R;
const double pi = acos(-1.0);
const double eps = 1e-10;
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  return (x < 0) ? -1 : 1;
}
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  double operator*(Point a) { return x * a.x + y * a.y; }
  double operator^(Point a) { return x * a.y - y * a.x; }
  Point operator+(Point a) { return Point(x + a.x, y + a.y); }
  Point operator-(Point a) { return Point(x - a.x, y - a.y); }
  Point operator*(double q) { return Point(x * q, y * q); }
};
Point now;
struct Circle {
  Point O;
  double r, poa;
  Circle() {}
  Circle(Point o, double r) : O(o), r(r){};
  Circle(Point o, double r, double poa) : O(o), r(r), poa(poa){};
} O;
Point Rotate(Point A, double rad) {
  return Point(A.x * cos(rad) - A.y * sin(rad),
               A.x * sin(rad) + A.y * cos(rad));
}
double dis(Point a, Point b) { return sqrt((a - b) * (a - b)); }
Point cal(double t) {
  double poa = wp * t;
  return Rotate(Point(xp, yp), poa);
}
int getLineCircleIntersection(Circle C, Point A, Point B, vector<Point>& sol) {
  double a = (B.x - A.x) * (B.x - A.x) + (B.y - A.y) * (B.y - A.y);
  double b = 2 * (B.x - A.x) * (A.x - C.O.x) + 2 * (B.y - A.y) * (A.y - C.O.y);
  double c =
      (A.x - C.O.x) * (A.x - C.O.x) + (A.y - C.O.y) * (A.y - C.O.y) - C.r * C.r;
  double delta = b * b - 4 * a * c;
  if (sgn(delta) < 0) {
    return 0;
  }
  if (sgn(delta) == 0) {
    double t = -b / (2 * a);
    sol.push_back(A + (B - A) * t);
    return 1;
  }
  double t1 = (-b - sqrt(delta)) / (2 * a);
  double t2 = (-b + sqrt(delta)) / (2 * a);
  sol.push_back(A + (B - A) * t1);
  sol.push_back(A + (B - A) * t2);
  return 2;
}
double Min(double x, double y) { return sgn(x - y) <= 0 ? x : y; }
double len(Point a) { return sqrt(a * a); }
double Angle(Point a, Point b) { return acos((a * b) / len(a) / len(b)); }
bool inCircle(Circle o, Point a) { return sgn(o.r - dis(a, o.O)) >= 0; }
double DistanceToSegment(Point P, Point A, Point B) {
  if (sgn((P - A) * (B - A)) < 0) return len(P - A);
  if (sgn((P - B) * (A - B)) < 0) return len(P - B);
  return fabs((B - A) ^ (P - A)) / len(A - B);
}
bool check2(Point a, Point b, Circle o) {
  return sgn(DistanceToSegment(o.O, a, b) - o.r) < 0;
}
bool Seg_Cir(Point a, Point b, Circle o) {
  if (inCircle(o, a) && inCircle(o, b)) return false;
  if (!inCircle(o, a) && inCircle(o, b)) return true;
  if (inCircle(o, a) && !inCircle(o, b)) return true;
  vector<Point> sol;
  if (getLineCircleIntersection(o, a, b, sol) == 2 && check2(a, b, o))
    return true;
  return false;
}
bool check(double t) {
  Point ed = cal(t);
  vector<Point> sol;
  double dist = 0;
  if (Seg_Cir(ed, now, O)) {
    dist = sqrt(len(ed) * len(ed) - r * r) + sqrt(len(now) * len(now) - r * r);
    double a = acos(r / len(ed));
    double b = acos(r / len(now));
    double ang = Angle(ed, now);
    ang = ang - a - b;
    dist += r * ang;
  } else {
    dist = dis(ed, now);
  }
  return sgn(dist - v * t) <= 0;
}
int main() {
  scanf("%lf%lf%lf", &xp, &yp, &vp);
  scanf("%lf%lf%lf%lf", &x, &y, &v, &r);
  R = dis(Point(xp, yp), Point(0, 0));
  wp = vp / R;
  now = Point(x, y);
  O = Circle(Point(0, 0), r);
  double l = 0, mid, r = 1e15;
  while (sgn(l - r) < 0) {
    mid = (l + r) / 2.0;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%.9f", r);
  return 0;
}