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:10000000")
using namespace std;
template <class T>
T inline sqr(T x) {
  return x * x;
}
const double pi = 3.1415926535897932384626433832795, eps = 1e-8;
const int inf = 1000000000;
struct point {
  double x, y;
};
struct line {
  double a, b, c;
};
double dist(point a, point b) {
  return pow(sqr(a.x - b.x) + sqr(a.y - b.y), 0.5);
};
point p;
point cen;
point st;
double v, r;
double D;
double vp;
inline point findpos(double t) {
  double stang = atan2(p.y, p.x);
  double w = vp / D;
  double finang = stang + w * t;
  point res;
  res.x = D * cos(finang);
  res.y = D * sin(finang);
  return res;
};
inline double getT(point a, point b) {
  double anga = atan2(a.y, a.x), angb = atan2(b.y, b.x);
  if (anga > angb) swap(anga, angb);
  double reqang = min(angb - anga, 2 * pi - (angb - anga));
  double reqlen = r * reqang;
  double res = reqlen / v;
  return res;
};
inline line crline(point a, point b) {
  line l;
  l.a = b.y - a.y;
  l.b = a.x - b.x;
  l.c = -l.a * a.x - l.b * a.y;
  return l;
};
double det(double a, double b, double c, double d) { return a * d - b * c; }
point intline(line m, line n) {
  double zn = det(m.a, m.b, n.a, n.b);
  point res;
  res.x = -det(m.c, m.b, n.c, n.b) / zn;
  res.y = -det(m.a, m.c, n.a, n.c) / zn;
  return res;
};
inline double dist(point a, line l) {
  return fabs(a.x * l.a + a.y * l.b + l.c) / pow(sqr(l.a) + sqr(l.b), 0.5);
};
bool in(point m, point a, point b) {
  return ((m.x <= max(a.x, b.x) + eps && m.x >= min(a.x, b.x) - eps) &&
          (m.y <= max(a.y, b.y) + eps && m.y >= min(a.y, b.y) - eps));
};
inline bool directway(point a, point b) {
  line l = crline(a, b);
  if (dist(cen, l) > r - eps) {
    return true;
  }
  line l1;
  l1.a = l.b;
  l1.b = -l.a;
  l1.c = 0;
  point m = intline(l1, l);
  if (!in(m, a, b)) return true;
  return false;
};
struct vect {
  double x, y;
};
inline point sum(vect w, point a) {
  point res;
  res.x = w.x + a.x;
  res.y = w.y + a.y;
  return res;
};
inline vect rot(vect w, double ang) {
  vect res;
  res.x = w.x * cos(ang) - w.y * sin(ang);
  res.y = w.x * sin(ang) + w.y * cos(ang);
  return res;
};
inline void findcas(point a, point &r1, point &r2) {
  double l = dist(cen, a);
  double ang = asin(r / l);
  vect w;
  w.x = -a.x, w.y = -a.y;
  w.x *= pow(sqr(l) - sqr(r), 0.5) / l;
  w.y *= pow(sqr(l) - sqr(r), 0.5) / l;
  vect w1 = rot(w, ang), w2 = rot(w, -ang);
  r1 = sum(w1, a), r2 = sum(w2, a);
};
inline bool f(double t) {
  point pos = findpos(t);
  if (directway(pos, st)) {
    double w = dist(pos, st);
    if (w < t * v + eps) {
      return true;
    } else
      return false;
  } else {
    point c1, c2, cp1, cp2;
    findcas(st, c1, c2);
    findcas(pos, cp1, cp2);
    double t1, t2, tp1, tp2;
    t1 = dist(c1, st) / v;
    t2 = dist(c2, st) / v;
    tp1 = dist(cp1, pos) / v;
    tp2 = dist(cp2, pos) / v;
    double maxt = inf;
    maxt = min(maxt, t1 + tp1 + getT(c1, cp1));
    maxt = min(maxt, t1 + tp2 + getT(c1, cp2));
    maxt = min(maxt, t2 + tp1 + getT(c2, cp1));
    maxt = min(maxt, t2 + tp2 + getT(c2, cp2));
    return maxt < t + eps;
  }
};
int main() {
  cen.x = cen.y = 0;
  cin >> p.x >> p.y;
  cin >> vp;
  cin >> st.x >> st.y >> v >> r;
  D = dist(cen, p);
  double L = 0, R = inf, M;
  while (L < R - eps) {
    M = (L + R) / 2;
    if (f(M))
      R = M;
    else
      L = M;
  }
  printf("%.8lf", L);
  return 0;
}