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 = acos(-1.0);
double sqr(double a) { return a * a; }
bool zero(double a) { return fabs(a) < eps; }
int sgn(double x) { return x < -eps ? -1 : x > eps; }
struct pt {
  double x, y;
  pt(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  pt operator-(const pt &r) const { return pt(x - r.x, y - r.y); }
  pt operator+(const pt &r) const { return pt(x + r.x, y + r.y); }
  pt operator*(const double &r) { return pt(x * r, y * r); }
  double operator^(const pt &r) const { return x * r.y - y * r.x; }
  pt rotate(double ag) {
    return pt(x * cos(ag) - y * sin(ag), x * sin(ag) + y * cos(ag));
  }
  pt RL() const { return pt(-y, x); }
  pt scale(double leg) { return (*this) * (leg / len()); }
  double len() { return sqrt(x * x + y * y); }
  double distance(const pt &r) { return ((*this) - r).len(); }
};
struct Circle {
  pt c;
  double r;
  double segment_area(const double &th) {
    return 0.5 * sqr(r) * (th - sin(th));
  }
  double dist(Circle rc) { return (c - rc.c).len(); }
  double distance(const pt &a, const pt &b) {
    double ang = fabs(atan2(a.y, a.x) - atan2(b.y, b.x));
    ang = min(ang, 2 * pi - ang);
    return ang * r;
  }
  bool get_tangency_points(pt p, pt &t1, pt &t2) const {
    double d = (p - c).len();
    if (sgn(d - r) <= 0) return false;
    pt pp = c + (p - c).scale(r * r / d);
    double h = sqrt(abs(r * r - (r * r * r * r) / (d * d)));
    t1 = pp + (p - c).RL().scale(h);
    t2 = pp - (p - c).RL().scale(h);
    return true;
  }
};
struct line {
  double a, b, c;
  line(double _a, double _b, double _c) : a(_a), b(_b), c(_c) {}
};
line lineFromSegment(pt p1, pt p2) {
  return line(p2.y - p1.y, p1.x - p2.x, p2 ^ p1);
}
double disptToSeg(pt p1, pt p2, pt p3) {
  double a = p1.distance(p2);
  double b = p1.distance(p3);
  double c = p2.distance(p3);
  if (fabs(a + b - c) < eps)
    return 0;
  else if (fabs(a + c - b) < eps || fabs(b + c - a) < eps)
    return min(a, b);
  double t1 = -sqr(a) + sqr(b) + sqr(c);
  double t2 = sqr(a) - sqr(b) + sqr(c);
  if (t1 <= 0 || t2 <= 0) return min(a, b);
  line l1 = lineFromSegment(p2, p3);
  return fabs(l1.a * p1.x + l1.b * p1.y + l1.c) / sqrt(sqr(l1.a) + sqr(l1.b));
}
int main() {
  double xp, yp, vp;
  double R;
  double x, y, v, r;
  scanf("%lf %lf %lf", &xp, &yp, &vp);
  scanf("%lf %lf %lf %lf", &x, &y, &v, &r);
  R = sqrt(xp * xp + yp * yp);
  Circle cir;
  pt a = pt(x, y);
  cir.c.x = cir.c.y = 0;
  cir.r = r;
  double left = 0, right = 1e10;
  while (fabs(left - right) > eps) {
    double mid = (left + right) / 2;
    pt star = pt(xp, yp).rotate(mid * vp / R);
    double dis;
    if (disptToSeg(pt(0, 0), a, star) > r - eps)
      dis = a.distance(star);
    else {
      pt p[4];
      cir.get_tangency_points(a, p[0], p[1]);
      cir.get_tangency_points(star, p[2], p[3]);
      dis = 1e100;
      for (int i = 0; i < 2; i++)
        for (int j = 2; j < 4; j++)
          dis = min(dis, a.distance(p[i]) + cir.distance(p[i], p[j]) +
                             p[j].distance(star));
    }
    if (dis / v < mid + eps)
      right = mid;
    else
      left = mid;
  }
  printf("%.10lf\n", left);
  return 0;
}