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>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
const double pi = 2 * acos(0.);
typedef struct {
  double x, y;
} point;
typedef struct {
  double a, b, c;
} line;
double dist(point a, point b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
void build_line(point p1, point p2, line &l) {
  l.a = p1.y - p2.y;
  l.b = p2.x - p1.x;
  l.c = p1.x * p2.y - p1.y * p2.x;
}
double dist_to_line(point p, line l) {
  return fabs((l.a * p.x + l.b * p.y + l.c) / sqrt(l.a * l.a + l.b * l.b));
}
void build_per(point p, line l1, line &l2) {
  l2.a = -l1.b;
  l2.b = l1.a;
  l2.c = l1.b * p.x - l1.a * p.y;
}
double plane(point p, line l) { return (p.x * l.a + p.y * l.b + l.c); }
double get_dist(point p1, point p2, point p3, double r) {
  double d, l, l1, l2, alpha, a1, a2;
  line p12, pl;
  double ans;
  double vp1, vp2, kas;
  double d13, d23;
  double q;
  l = dist(p1, p2);
  build_line(p1, p2, p12);
  d = dist_to_line(p3, p12);
  if (d >= r)
    ans = l;
  else {
    build_per(p3, p12, pl);
    vp1 = plane(p1, pl);
    vp2 = plane(p2, pl);
    if (vp1 * vp2 >= 0) {
      ans = l;
    } else {
      d13 = dist(p1, p3);
      d23 = dist(p2, p3);
      l1 = sqrt(d13 * d13 - r * r);
      l2 = sqrt(d23 * d23 - r * r);
      q = (d23 * d23 + d13 * d13 - l * l) / 2 / d13 / d23;
      if (fabs(q) < 1)
        alpha = acos(q);
      else
        alpha = 2 * acos(0.);
      a1 = acos(r / d13);
      a2 = acos(r / d23);
      alpha -= (a1 + a2);
      kas = alpha * r;
      ans = l1 + l2 + kas;
    }
  }
  return ans;
}
double xp, yp, vp;
double x, y, v, r;
int main() {
  cin >> xp >> yp >> vp;
  cin >> x >> y >> v >> r;
  double lf = 0, rt = 1e20;
  double current = atan2(yp, xp);
  double R = sqrt(xp * xp + yp * yp);
  double angspeed = vp / R;
  for (int iter = 0; iter < 500; ++iter) {
    double key = (lf + rt) / 2.;
    point p1, p2, p3;
    p3.x = p3.y = 0;
    p1.x = cos(current + key * angspeed) * R,
    p1.y = sin(current + key * angspeed) * R;
    p2.x = x, p2.y = y;
    double d = get_dist(p1, p2, p3, r);
    if (d <= key * v) {
      rt = key;
    } else {
      lf = key;
    }
  }
  printf("%.10lf\n", lf);
  return 0;
}