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;
struct vect {
  double x, y;
  vect() {}
  vect(double x, double y) : x(x), y(y) {}
  vect operator+(vect const &T) const { return vect(x + T.x, y + T.y); }
  vect operator-(vect const &T) const { return vect(x - T.x, y - T.y); }
  vect operator*(double const &t) const { return vect(x * t, y * t); }
  double operator%(vect const &T) const { return x * T.x + y * T.y; }
  double operator^(vect const &T) const { return x * T.y - y * T.x; }
  double len() { return sqrt(x * x + y * y); }
  double len2() { return x * x + y * y; }
  vect rot() const { return vect(-y, x); }
  vect rot(double t) const {
    return vect(x * cos(t) - y * sin(t), x * sin(t) + y * cos(t));
  }
  bool operator<(vect const &T) const { return x == T.x ? y < T.y : x < T.x; }
  int get() { return scanf("%lf%lf", &x, &y); }
  vect norm() { return *this * (1 / len()); }
};
const double PI = acos(-1.);
int equalPt(vect p1, vect p2) {
  return fabs(p2.x - p1.x) <= 1e-8 && fabs(p2.y - p1.y) <= 1e-8;
}
double DPS(vect p, vect L1, vect L2) {
  if (equalPt(L1, L2)) return (L1 - p).len();
  if ((L2 - L1) % (p - L1) < 0 || (L1 - L2) % (p - L2) < 0)
    return min((p - L1).len(), (p - L2).len());
  return (fabs((L2 - L1) ^ (p - L1))) / ((L2 - L1).len());
}
double vp, v, r, lo, hi, R, w, res, t, tt, d;
vect p, s;
int main() {
  p.get(), scanf("%lf", &vp);
  s.get(), scanf("%lf%lf", &v, &r);
  R = p.len();
  w = atan2(p.y, p.x);
  lo = 0;
  hi = 1e30;
  for (int itr = (0); itr < (1000); itr++) {
    t = (lo + hi) * .5;
    tt = w + t * (vp / R);
    p = vect(R * cos(tt), R * sin(tt));
    d = DPS(vect(0, 0), s, p);
    if (d + 1e-8 <= r) {
      double t1, t2;
      t1 = acos(r / s.len());
      t2 = acos(r / p.len());
      vect a, b, p1, p2;
      double t0;
      res = 1e50;
      for (int i = (0); i < (4); i++) {
        a = s.rot(t1 * ((i & 1) ? -1 : 1));
        b = p.rot(t2 * ((i & 1) ? 1 : -1));
        a = a * (r / a.len());
        b = b * (r / b.len());
        t0 = fabs(atan2(a.y, a.x) - atan2(b.y, b.x));
        while (t0 < -1e-8) t0 += PI * 2;
        while (t0 >= PI * 2) t0 -= PI * 2;
        t0 = min(t0, 2 * PI - t0);
        res = min(res, (s - a).len() + (p - b).len() + r * t0);
      }
      res /= v;
    } else
      res = (s - p).len() / v;
    if (res <= t + 1e-8)
      hi = t;
    else
      lo = t;
  }
  printf("%.9f\n", (lo + hi) / 2);
  return 0;
}