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;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const double eps = 1e-8;
const double inf = 1e20;
const double pi = acos(1.0);
const int maxp = 1010;
int gcd(int a, int b) { return !b ? a : gcd(b, a % b); }
bool is0(double x) {
  if (fabs(x) < eps)
    return 1;
  else
    return 0;
}
int sgn(double x) {
  if (fabs(x) < eps) return 0;
  if (x < 0)
    return -1;
  else
    return 1;
}
struct Point {
  double x, y;
  Point(){};
  Point(double _x, double _y) {
    x = _x;
    y = _y;
  }
  bool operator==(Point b) const {
    return sgn(x - b.x) == 0 && sgn(y - b.y) == 0;
  }
  bool operator<(Point b) const {
    return sgn(x - b.x) == 0 ? sgn(y - b.y) < 0 : x < b.x;
  }
  Point operator-(const Point& b) const { return Point(x - b.x, y - b.y); }
  Point operator+(const Point& b) const { return Point(x + b.x, y + b.y); }
  Point operator*(const double& k) const { return Point(x * k, y * k); }
  Point operator/(const double& k) const { return Point(x / k, y / k); }
  double operator^(const Point& b) const { return x * b.y - y * b.x; }
  double operator*(const Point& b) const { return x * b.x + y * b.y; }
  double distance(Point p) { return hypot(x - p.x, y - p.y); }
  double len() { return hypot(x, y); }
  Point trunc(double r) {
    double l = len();
    if (!sgn(l)) return *this;
    r /= l;
    return Point(x * r, y * r);
  }
  Point rotleft() { return Point(-y, x); }
  Point rotright() { return Point(y, -x); }
  Point rotate(Point p, double angle) {
    Point v = (*this) - p;
    double c = cos(angle), s = sin(angle);
    return Point(p.x + v.x * c - v.y * s, p.y + v.x * s + v.y * c);
  }
};
struct Line {
  Point s, e;
  Line(Point _s, Point _e) {
    s = _s;
    e = _e;
  };
  Line(double a = 0, double b = 0, double c = 0) {
    if (sgn(a) == 0) {
      s = Point(0, -c / b);
      e = Point(1, -c / b);
    } else if (sgn(b) == 0) {
      s = Point(-c / a, 0);
      e = Point(-c / a, 1);
    } else {
      s = Point(0, -c / b);
      e = Point(1, (-c - a) / b);
    }
  }
  double length() { return s.distance(e); }
  double dispointtoline(Point p) { return fabs((p - s) ^ (e - s)) / length(); }
  double dispointtoseg(Point p) {
    if (sgn((p - s) * (e - s)) < 0 || sgn((p - e) * (s - e)) < 0)
      return min(p.distance(s), p.distance(e));
    return dispointtoline(p);
  }
};
struct circle {
  Point p;
  double r;
  circle() {}
  circle(Point _p, double _r) {
    p = _p;
    r = _r;
  }
  circle(double x, double y, double _r) {
    p = Point(x, y);
    r = _r;
  }
  int relationcircle(circle v) {
    double d = p.distance(v.p);
    if (sgn(d - r - v.r) > 0) return 5;
    if (sgn(d - r - v.r) == 0) return 4;
    double l = fabs(r - v.r);
    if (sgn(d - r - v.r) < 0 && sgn(d - l) > 0) return 3;
    if (sgn(d - l) == 0) return 2;
    if (sgn(d - l) < 0) return 1;
  }
  int pointcrosscircle(circle v, Point& p1, Point& p2) {
    int rel = relationcircle(v);
    if (rel == 1 || rel == 5) return 0;
    double d = p.distance(v.p);
    double l = (d * d + r * r - v.r * v.r) / (2.0 * d);
    double h = sqrt(r * r - l * l);
    Point tmp = p + (v.p - p).trunc(l);
    p1 = tmp + ((v.p - p).rotleft().trunc(h));
    p2 = tmp + ((v.p - p).rotright().trunc(h));
    if (rel == 2 || rel == 5) return 1;
    return 2;
  }
  int relation(Point b) {
    double dst = b.distance(p);
    if (sgn(dst - r) < 0)
      return 2;
    else if (sgn(dst - r) == 0)
      return 1;
    return 0;
  }
  int tangentline(Point q, Line& u, Line& v) {
    int x = relation(q);
    if (x == 2) return 0;
    if (x == 1) {
      u = Line(q, q + (q - p).rotleft());
      v = u;
      return 1;
    }
    double d = p.distance(q);
    double l = r * r / d;
    double h = sqrt(r * r - l * l);
    u = Line(q, p + ((q - p).trunc(l) + (q - p).rotleft().trunc(h)));
    v = Line(q, p + ((q - p).trunc(l) + (q - p).rotright().trunc(h)));
    return 2;
  }
  int relationseg(Line v) {
    double dst = v.dispointtoseg(p);
    if (sgn(dst - r) < 0)
      return 2;
    else if (sgn(dst - r) == 0)
      return 1;
    return 0;
  }
};
int main() {
  double xp, yp, vp, x, y, v, r;
  cin >> xp >> yp >> vp >> x >> y >> v >> r;
  double t;
  double rr, l, R;
  R = sqrt(xp * xp + yp * yp);
  rr = 2.0 * pi * R / (v - vp);
  rr = rr + sqrt(x * x + y * y) + R;
  l = 0;
  Point q(x, y), O(0, 0);
  double w = vp / R;
  t = 0;
  while (!is0(rr - l)) {
    t = (rr - l) / 2.0 + l;
    Point h(xp, yp);
    h = h.rotate(Point(0, 0), w * t);
    Line hq(h, q);
    double D1 = circle(Point(0, 0), r).relationseg(hq);
    double D = hq.dispointtoline(Point(0, 0));
    if (D > r || sgn(D - r) == 0 ||
        sgn(hq.dispointtoseg(O) - hq.dispointtoline(O)) > 0) {
      double temp = hq.length();
      double tk = v * t;
      if (is0(tk - temp))
        break;
      else if (tk > temp) {
        rr = t;
      } else
        l = t;
    } else {
      Line left1, right1, left2, right2;
      circle tempcircle(Point(0, 0), r);
      int tp = tempcircle.tangentline(q, left1, right1);
      Point a = left1.e, b = right1.e;
      tp = tempcircle.tangentline(h, left2, right2);
      Point c = left2.e, d = right2.e;
      double td1, td2;
      double d1 = a.distance(c);
      double d2 = b.distance(d);
      double x1 = asin(d1 / (2.0 * r));
      double x2 = asin(d2 / (2.0 * r));
      x1 = 2.0 * x1 * r;
      x2 = 2.0 * x2 * r;
      d1 = x1 + q.distance(a) + h.distance(c);
      d2 = min(d1, x2 + q.distance(b) + h.distance(d));
      td1 = d2;
      d1 = a.distance(d);
      d2 = b.distance(c);
      x1 = asin(d1 / (2.0 * r));
      x2 = asin(d2 / (2.0 * r));
      x1 = 2.0 * x1 * r;
      x2 = 2.0 * x2 * r;
      d1 = x1 + q.distance(a) + h.distance(d);
      d2 = min(d1, x2 + q.distance(b) + h.distance(c));
      td2 = d2;
      double temp = min(td1, td2);
      double tk = v * t;
      if (is0(tk - t))
        break;
      else if (tk > temp) {
        rr = t;
      } else
        l = t;
    }
  }
  printf("%.8lf\n", t);
  return 0;
}