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 pi = 3.1415926535897932384, eps = 1e-9;
struct P {
  double x, y;
};
struct Line {
  P p1, p2;
};
P operator+(P a, P b) { return (P){a.x + b.x, a.y + b.y}; }
P operator-(P a, P b) { return (P){a.x - b.x, a.y - b.y}; }
P operator*(P a, double b) { return (P){a.x * b, a.y * b}; }
P operator-(P a) { return (P){-a.x, -a.y}; }
double X(P a, P b) { return a.x * b.y - a.y * b.x; }
double X(P o, P a, P b) { return X(a - o, b - o); }
double dot(P a, P b) { return a.x * b.x + a.y * b.y; }
double dis2(P a, P b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
double dis(P a, P b) { return sqrt(dis2(a, b)); }
double dis2(P a) { return a.x * a.x + a.y * a.y; }
double dis(P a) { return sqrt(dis2(a)); }
double arc(double x) {
  int tmp = (int)(x / (2 * pi));
  x -= tmp * 2 * pi;
  if (x < 0.0) x += 2 * pi;
  return x;
}
double dis(Line a, P b) {
  if (dot(a.p1 - a.p2, b - a.p2) < 0.0 || dot(a.p2 - a.p1, b - a.p1) < 0.0)
    return min(dis(a.p1, b), dis(a.p2, b));
  return fabs(X(a.p1, a.p2, b)) / dis(a.p1, a.p2);
}
double c_arc(P a, double rr) {
  a.x = arc(acos(a.x / rr));
  if (a.y > 0.0 && a.x > pi)
    a.x = pi + (pi - a.x);
  else if (a.y < 0.0 && a.x < pi)
    a.x = pi + (pi - a.x);
  a.x = arc(a.x);
  return a.x;
}
P rotate(P a, double b) {
  P re;
  re.x = a.x * cos(b) - a.y * sin(b);
  re.y = a.x * sin(b) + a.y * cos(b);
  return re;
}
double ll, rr, mid, r, R, vp, v, starc, edarc;
P st, ed;
void cut(P a, P &c1, P &c2) {
  double rate = sqrt(dis2(a) - r * r) / dis(a), ang = asin(r / dis(a));
  P x = -(a * rate);
  c1 = rotate(x, ang) + a;
  c2 = rotate(x, -ang) + a;
}
bool check(double x) {
  edarc = arc(starc + vp * x);
  ed.x = R * cos(edarc);
  ed.y = R * sin(edarc);
  P jiao[2][2];
  Line con = (Line){st, ed};
  double d = dis(con, (P){0, 0});
  double time = 0.0;
  if (r <= d) {
    time = dis(st, ed) / v;
  } else {
    double mn = 1e9, a1, a2;
    cut(st, jiao[0][0], jiao[0][1]);
    cut(ed, jiao[1][0], jiao[1][1]);
    for (int i = 0; i <= 1; i++)
      for (int j = 0; j <= 1; j++) {
        a1 = c_arc(jiao[0][i], r);
        a2 = c_arc(jiao[1][j], r);
        a1 = a1 - a2;
        if (a1 < 0.0) a1 = -a1;
        a1 = arc(a1);
        a1 = min(a1, 2 * pi - a1);
        mn = min(mn, r * a1 / v);
      }
    time = dis(ed, jiao[1][0]) / v + dis(st, jiao[0][0]) / v + mn;
  }
  return time <= x;
}
int main() {
  while (~scanf("%lf %lf %lf %lf %lf %lf %lf", &ed.x, &ed.y, &vp, &st.x, &st.y,
                &v, &r)) {
    R = dis(ed);
    vp = vp / R;
    starc = c_arc(ed, R);
    ll = 0.0;
    rr = 1e6;
    while (rr - ll > 3e-7) {
      mid = (ll + rr) / 2.0;
      if (check(mid))
        rr = mid;
      else
        ll = mid;
    }
    printf("%.10lf\n", ll);
  }
  return 0;
}